36 lines
743 B
PHP
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);
|
|
}
|
|
|
|
}
|