Created
July 24, 2022 06:35
-
-
Save NandoKstroNet/d4a9c33aea473959e5bc63ec18801e72 to your computer and use it in GitHub Desktop.
Área de Invoices Cliente Projeto VideoFlix em https://laravelmastery.com.br
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="max-w-7xl mx-auto mt-10 py-6 px-4 sm:px-6 lg:px-8"> | |
<x-slot name="header">Minha Assinatura</x-slot> | |
<div class="rounded bg-gray-800 p-2"> | |
<table class="min-w-full divide-y divide-gray-200"> | |
<thead> | |
<tr> | |
<th class="px-6 py-3 text-left text-xs font-medium text-white uppercase tracking-wider">Data Cobrança</th> | |
<th class="px-6 py-3 text-left text-xs font-medium text-white uppercase tracking-wider">Valor Cobrado</th> | |
<th class="px-6 py-3 text-left text-xs font-medium text-white uppercase tracking-wider">Ações</th> | |
</tr> | |
</thead> | |
<tbody> | |
@foreach ($invoices as $invoice) | |
<tr> | |
<td class="px-6 py-6 text-left text-xs font-medium text-white uppercase tracking-wider"> | |
{{ $invoice->date()->toFormattedDateString() }} | |
</td> | |
<td class="px-6 py-6 text-left text-xs font-medium text-white uppercase tracking-wider"> | |
{{ $invoice->total() }} | |
</td> | |
<td class="px-6 py-6 text-left text-xs font-medium text-white uppercase tracking-wider"> | |
<a href="{{route('subscriptions.my-subscription.invoice', $invoice->id)}}" | |
class="border border-white rounded px-4 py-2 hover:bg-white hover:text-gray-800 transition | |
ease-in-out duration-300" target="_blank">Download</a> | |
</td> | |
</tr> | |
@endforeach | |
</tbody> | |
</table> | |
</div> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Route::get('subscriptions/my-subscription', \App\Http\Livewire\Subscriptions\CustomerSubscription::class) | |
->name('subscriptions.my-subscription') | |
->middleware('auth'); | |
Route::get('subscriptions/my-subscription/invoice/{invoiceId}', function ($invoiceId) { | |
return auth()->user()->downloadInvoice($invoiceId, [ | |
'vendor' => 'VIDEO_FLIX', | |
'product' => 'Assinatura VideoFlix', | |
]); | |
}) | |
->name('subscriptions.my-subscription.invoice') | |
->middleware('auth'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment