Skip to content

Instantly share code, notes, and snippets.

@NandoKstroNet
Last active December 15, 2020 20:56
Show Gist options
  • Save NandoKstroNet/bb8a2b00cc45da1fe72be838c54a6f66 to your computer and use it in GitHub Desktop.
Save NandoKstroNet/bb8a2b00cc45da1fe72be838c54a6f66 to your computer and use it in GitHub Desktop.
Listagem de Planos - Code Experts Curso Livewire na Prática
<div class="max-w-7xl mx-auto py-15 px-4">
<x-slot name="header">Planos</x-slot>
<div class="flex flex-col">
<div class="-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
<div class="py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8">
<div class="shadow overflow-hidden border-b border-gray-200 sm:rounded-lg">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
#
</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
Plano
</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
Valor
</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
Criado Em
</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<!-- TO-DO: receber planos do componente-->
@foreach(\App\Models\Plan::all() as $plan)
<tr>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm text-gray-900">{{$plan->id}}</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm text-gray-900">{{$plan->name}}</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm text-gray-900">{{$plan->price}}</div>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
{{$plan->created_at->format('d/m/Y H:i:s')}}
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment