StocksNew/Modules/Admin/app/Repositories/ProvinceRepository.php
Sampanna Rimal 53c0140f58 first commit
2024-08-27 17:48:06 +05:45

36 lines
680 B
PHP

<?php
namespace Modules\Admin\Repositories;
use Modules\Admin\Models\Province;
class ProvinceRepository implements ProvinceInterface
{
public function findAll()
{
return Province::get();
}
public function getProvinceById($provinceId)
{
return Province::findOrFail($provinceId);
}
public function delete($provinceId)
{
Province::destroy($provinceId);
}
public function create(array $provinceDetails)
{
return Province::create($provinceDetails);
}
public function update($provinceId, array $newDetails)
{
return Province::where('id', $provinceId)->update($newDetails);
}
}