| Total Complexity | 9 |
| Total Lines | 48 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class PaymentRepository implements PaymentRepositoryInterface |
||
| 11 | { |
||
| 12 | // Payment Index |
||
| 13 | public function indexPayment() |
||
| 14 | { |
||
| 15 | $payments = config('adminetic.caching', true) |
||
| 16 | ? (Cache::has('payments') ? Cache::get('payments') : Cache::rememberForever('payments', function () { |
||
| 17 | return Payment::orderBy('position')->get(); |
||
| 18 | })) |
||
| 19 | : Payment::orderBy('position')->get(); |
||
| 20 | |||
| 21 | return compact('payments'); |
||
| 22 | } |
||
| 23 | |||
| 24 | // Payment Create |
||
| 25 | public function createPayment() |
||
| 26 | { |
||
| 27 | // |
||
| 28 | } |
||
| 29 | |||
| 30 | // Payment Store |
||
| 31 | public function storePayment(PaymentRequest $request) |
||
| 32 | { |
||
| 33 | Payment::create($request->validated()); |
||
| 34 | } |
||
| 35 | |||
| 36 | // Payment Show |
||
| 37 | public function showPayment(Payment $payment) |
||
| 38 | { |
||
| 39 | return compact('payment'); |
||
| 40 | } |
||
| 41 | |||
| 42 | // Payment Edit |
||
| 43 | public function editPayment(Payment $payment) |
||
| 44 | { |
||
| 45 | return compact('payment'); |
||
| 46 | } |
||
| 47 | |||
| 48 | // Payment Update |
||
| 49 | public function updatePayment(PaymentRequest $request, Payment $payment) |
||
| 50 | { |
||
| 51 | $payment->update($request->validated()); |
||
| 52 | } |
||
| 53 | |||
| 54 | // Payment Destroy |
||
| 55 | public function destroyPayment(Payment $payment) |
||
| 58 | } |
||
| 59 | } |
||
| 60 |