StocksNew/Modules/Office/app/Repositories/DepositRepository.php
Sampanna Rimal 53c0140f58 first commit
2024-08-27 17:48:06 +05:45

36 lines
665 B
PHP

<?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);
}
}