Heera/Modules/Admin/app/Repositories/NationalityRepository.php
2024-05-16 09:31:08 +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);
}
}