mirror of
https://github.com/Bigherollc/wticreatorstudio.git
synced 2026-07-28 23:17:58 -04:00
36 lines
695 B
PHP
36 lines
695 B
PHP
<?php
|
|
namespace Modules\Refund\Repositories;
|
|
|
|
use Modules\Refund\Entities\RefundReason;
|
|
use Carbon\Carbon;
|
|
|
|
class RefundReasonRepository
|
|
{
|
|
public function getAll()
|
|
{
|
|
return RefundReason::latest()->get();
|
|
}
|
|
|
|
public function save($data)
|
|
{
|
|
$refundReason = new RefundReason();
|
|
$refundReason->fill($data)->save();
|
|
}
|
|
|
|
public function update($data, $id)
|
|
{
|
|
RefundReason::findOrFail($id)->update([
|
|
'reason' => $data['reason']
|
|
]);
|
|
}
|
|
|
|
public function delete($id)
|
|
{
|
|
return RefundReason::findOrFail($id)->delete();
|
|
}
|
|
|
|
public function getById($id){
|
|
return RefundReason::find($id);
|
|
}
|
|
}
|