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

36 lines
731 B
PHP

<?php
namespace Modules\Admin\Repositories;
use Modules\Admin\Models\Nationality;
class NationalityRepository implements NationalityInterface
{
public function findAll()
{
return Nationality::get();
}
public function getNationalityById($nationalityId)
{
return Nationality::findOrFail($nationalityId);
}
public function delete($nationalityId)
{
Nationality::destroy($nationalityId);
}
public function create(array $nationalityDetails)
{
return Nationality::create($nationalityDetails);
}
public function update($nationalityId, array $newDetails)
{
return Nationality::where('id', $nationalityId)->update($newDetails);
}
}