2017-09-14 22:21:00 +03:00
|
|
|
<?php
|
|
|
|
|
2020-01-20 13:39:32 +03:00
|
|
|
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()
|
|
|
|
{
|
2019-11-30 02:08:25 +03:00
|
|
|
$payments = Transaction::type('income')->where('contact_id', '=', user()->contact->id)->paginate();
|
2017-09-14 22:21:00 +03:00
|
|
|
|
2017-11-29 19:37:16 +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
|
|
|
}
|
|
|
|
}
|