Heera/Modules/Admin/app/Repositories/GenderRepository.php
2024-05-16 09:31:08 +05:45

36 lines
646 B
PHP

<?php
namespace Modules\Admin\Repositories;
use Modules\Admin\Models\Gender;
class GenderRepository implements GenderInterface
{
public function findAll()
{
return Gender::get();
}
public function getGenderById($genderId)
{
return Gender::findOrFail($genderId);
}
public function delete($genderId)
{
Gender::destroy($genderId);
}
public function create(array $genderDetails)
{
return Gender::create($genderDetails);
}
public function update($genderId, array $newDetails)
{
return Gender::where('id', $genderId)->update($newDetails);
}
}