40 lines
921 B
PHP
Raw Normal View History

2017-09-14 22:21:00 +03:00
<?php
namespace App\Http\Controllers\Portal;
2017-09-14 22:21:00 +03:00
2019-11-16 10:21:14 +03:00
use App\Abstracts\Http\Controller;
use App\Models\Banking\Transaction;
2017-09-14 22:21:00 +03:00
use App\Utilities\Modules;
class Payments extends Controller
{
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
2020-05-03 11:15:56 +03:00
$payments = Transaction::income()->where('contact_id', '=', user()->contact->id)->paginate();
2017-09-14 22:21:00 +03:00
$payment_methods = Modules::getPaymentMethods('all');
2017-09-14 22:21:00 +03:00
2019-11-30 02:08:25 +03:00
return view('portal.payments.index', compact('payments', 'payment_methods'));
2017-09-14 22:21:00 +03:00
}
/**
* Show the form for viewing the specified resource.
*
2019-11-16 10:21:14 +03:00
* @param Transaction $payment
2017-09-14 22:21:00 +03:00
*
* @return Response
*/
2019-11-16 10:21:14 +03:00
public function show(Transaction $payment)
2017-09-14 22:21:00 +03:00
{
2019-11-16 10:21:14 +03:00
$payment_methods = Modules::getPaymentMethods('all');
2017-09-14 22:21:00 +03:00
2019-11-16 10:21:14 +03:00
return view('portal.payments.show', compact('payment', 'payment_methods'));
2017-09-14 22:21:00 +03:00
}
}