StocksNew/Modules/Office/app/Repositories/DepositRepository.php

36 lines
665 B
PHP
Raw Normal View History

2024-08-27 12:03:06 +00:00
<?php
namespace Modules\Office\Repositories;
use Modules\Office\Models\Deposit;
class DepositRepository implements DepositInterface
{
public function findAll()
{
return Deposit::get();
}
public function getDepositById($depositId)
{
return Deposit::findOrFail($depositId);
}
public function delete($depositId)
{
Deposit::destroy($depositId);
}
public function create(array $depositDetails)
{
return Deposit::create($depositDetails);
}
public function update($depositId, array $newDetails)
{
return Deposit::where('id', $depositId)->update($newDetails);
}
}