StocksNew/Modules/Admin/app/Repositories/GenderRepository.php

36 lines
646 B
PHP
Raw Normal View History

2024-08-27 12:03:06 +00:00
<?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);
}
}