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

35 lines
666 B
PHP

<?php
namespace Modules\Payroll\Repositories;
use Modules\Payroll\Models\Payment;
class PaymentRepository implements PaymentInterface
{
public function findAll()
{
return Payment::get();
}
public function getPaymentById($paymentId)
{
return Payment::findOrFail($paymentId);
}
public function delete($paymentId)
{
Payment::destroy($paymentId);
}
public function create(array $paymentDetails)
{
return Payment::create($paymentDetails);
}
public function update($paymentId, array $newDetails)
{
return Payment::where('id', $paymentId)->update($newDetails);
}
}