StocksNew/Modules/Admin/app/Repositories/GenderRepository.php
Sampanna Rimal 53c0140f58 first commit
2024-08-27 17:48:06 +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);
}
}