New-OMIS/Modules/Admin/app/Repositories/ResignationRepository.php
2024-04-14 18:29:29 +05:45

36 lines
743 B
PHP

<?php
namespace Modules\Admin\Repositories;
use Modules\Admin\Models\Resignation;
class ResignationRepository implements ResignationInterface
{
public function findAll()
{
return Resignation::get();
}
public function getResignationById($resignationId)
{
return Resignation::findOrFail($resignationId);
}
public function delete($resignationId)
{
Resignation::destroy($resignationId);
}
public function create(array $resignationDetails)
{
return Resignation::create($resignationDetails);
}
public function update($resignationId, array $newDetails)
{
return Resignation::where('resignation_id', $resignationId)->update($newDetails);
}
}