From eb8d94a31aae312f429d19592f0416f8e6e0284c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Fri, 25 Jun 2021 10:05:41 +0300 Subject: [PATCH] Payment show page for portal page --- app/Http/Controllers/Portal/Payments.php | 15 ++++++ .../views/portal/payments/signed.blade.php | 46 +++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 resources/views/portal/payments/signed.blade.php diff --git a/app/Http/Controllers/Portal/Payments.php b/app/Http/Controllers/Portal/Payments.php index d9ce57df8..5c4f1c576 100644 --- a/app/Http/Controllers/Portal/Payments.php +++ b/app/Http/Controllers/Portal/Payments.php @@ -7,6 +7,7 @@ use App\Models\Banking\Transaction; use App\Models\Setting\Currency; use App\Http\Requests\Portal\PaymentShow as Request; use App\Utilities\Modules; +use Illuminate\Support\Facades\URL; class Payments extends Controller { @@ -51,4 +52,18 @@ class Payments extends Controller return $this->response('portal.currencies.index', compact('currencies')); } + + public function signed(Transaction $payment) + { + if (empty($payment)) { + return redirect()->route('login'); + } + + $payment_methods = Modules::getPaymentMethods(); + + $print_action = URL::signedRoute('signed.payments.print', [$payment->id]); + $pdf_action = URL::signedRoute('signed.payments.pdf', [$payment->id]); + + return view('portal.payments.signed', compact('payment', 'payment_methods', 'print_action', 'pdf_action')); + } } diff --git a/resources/views/portal/payments/signed.blade.php b/resources/views/portal/payments/signed.blade.php new file mode 100644 index 000000000..9039502f6 --- /dev/null +++ b/resources/views/portal/payments/signed.blade.php @@ -0,0 +1,46 @@ +@extends('layouts.signed') + +@section('title', trans_choice('general.payments', 1) . ': ' . @date($payment->paid_at)) + +@section('new_button') + @stack('button_print_start') + + {{ trans('general.print') }} + + @stack('button_print_end') + + @stack('button_pdf_start') + + {{ trans('general.download') }} + + @stack('button_pdf_end') + + @stack('button_dashboard_start') + @if (!user()) + + {{ trans('payments.all_payments') }} + + @endif + @stack('button_dashboard_end') +@endsection + +@section('content') + + + +@endsection + +@push('footer_start') + + +@endpush