first commit

This commit is contained in:
Sampanna Rimal
2024-08-27 17:48:06 +05:45
commit 53c0140f58
10839 changed files with 1125847 additions and 0 deletions

View File

@ -0,0 +1,34 @@
<?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);
}
}