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

36 lines
612 B
PHP

<?php
namespace Modules\Admin\Repositories;
use Modules\Admin\Models\City;
class CityRepository implements CityInterface
{
public function findAll()
{
return City::get();
}
public function getCityById($cityId)
{
return City::findOrFail($cityId);
}
public function delete($cityId)
{
City::destroy($cityId);
}
public function create(array $cityDetails)
{
return City::create($cityDetails);
}
public function update($cityId, array $newDetails)
{
return City::where('id', $cityId)->update($newDetails);
}
}