This repository has been archived on 2024-05-20. You can view files and clone it, but cannot push or open issues or pull requests.

46 lines
1.4 KiB
PHP

<?php
use App\Models\Quote;
use App\Providers\RouteServiceProvider;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Validation\ValidationException;
use Livewire\Attributes\Layout;
use Livewire\Attributes\Rule;
use Livewire\Volt\Component;
new #[Layout('layouts.guest')] class extends Component
{
public Collection $quotes;
public function mount(): void
{
$this->quotes = Quote::all()->sortDesc();
}
}; ?>
<div class="px-4 sm:px-6 lg:px-8">
<div class="-mx-4 mt-10 ring-1 ring-gray-300 sm:mx-0 sm:rounded-lg bg-nexi-primary dark:bg-zinc-800 transition-colors duration-300">
<table class="min-w-full divide-y divide-gray-300">
<thead>
<tr>
<th scope="col"
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-nexi-black dark:text-gray-200 sm:pl-6">
Quotes
</th>
{{-- TODO: add logged in user stuff --}}
</tr>
</thead>
<tbody>
@foreach ($quotes as $quote)
<tr>
<td class="relative py-4 pl-4 pr-3 text-sm sm:pl-6 border-t text-nexi-black dark:text-gray-200">
{{ $quote->quote }}
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>