first change
This commit is contained in:
38
Modules/Leave/app/Repositories/LeaveBalanceRepository.php
Normal file
38
Modules/Leave/app/Repositories/LeaveBalanceRepository.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Leave\Repositories;
|
||||
|
||||
use Modules\Leave\Models\LeaveBalance;
|
||||
|
||||
class LeaveBalanceRepository implements LeaveBalanceInterface
|
||||
{
|
||||
public function pluck()
|
||||
{
|
||||
return LeaveBalance::pluck('name', 'id');
|
||||
}
|
||||
public function findAll()
|
||||
{
|
||||
return LeaveBalance::get();
|
||||
}
|
||||
|
||||
public function create(array $LeaveBalanceDetails)
|
||||
{
|
||||
return LeaveBalance::create($LeaveBalanceDetails);
|
||||
}
|
||||
|
||||
public function update($LeaveBalanceId, array $newDetails)
|
||||
{
|
||||
return LeaveBalance::where('id', $LeaveBalanceId)->update($newDetails);
|
||||
}
|
||||
|
||||
public function where(array $filter)
|
||||
{
|
||||
return LeaveBalance::where($filter);
|
||||
}
|
||||
|
||||
public function delete($LeaveBalanceId)
|
||||
{
|
||||
LeaveBalance::destroy($LeaveBalanceId);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user