August 15, 2022
Full Laravel Restaurant Reservation Website | Laravel 9 Tutorial
Section 2
use App\Http\Middleware\Admin;
Section 3
https://github.com/jan-heise/responsive-navbar-with-dropdown
Migration and models
$table->string('name'); $table->text('description'); $table->string('image');
$table->string('name'); $table->text('description'); $table->string('image'); $table->decimal('price', 10,2);
$table->string('name'); $table->integer('guest_number'); $table->string('status')->default('available'); $table->string('location');
$table->string('first_name'); $table->string('last_name'); $table->string('email'); $table->string('tel_number'); $table->dateTime('res_date'); $table->unsignedBigInteger('table_id'); $table->integer('guest_number');
Controllers
@props(['active'])@php$classes = ($active ?? false) ? 'block px-4 py-2 mt-2 text-sm font-semibold text-gray-900 bg-gray-200 rounded-lg dark-mode:bg-gray-700 dark-mode:hover:bg-gray-600 dark-mode:focus:bg-gray-600 dark-mode:focus:text-white dark-mode:hover:text-white dark-mode:text-gray-200 hover:text-gray-900 focus:text-gray-900 hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline' : 'block px-4 py-2 mt-2 text-sm font-semibold text-gray-900 bg-transparent rounded-lg dark-mode:bg-transparent dark-mode:hover:bg-gray-600 dark-mode:focus:bg-gray-600 dark-mode:focus:text-white dark-mode:hover:text-white dark-mode:text-gray-200 hover:text-gray-900 focus:text-gray-900 hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline';@endphp<a {{ $attributes->merge(['class' => $classes]) }}> {{ $slot }}</a>
https://flowbite.com/docs/components/tables/
php artisan make:request CategoryStoreRequest
Edit
<a href="{{route('admin.categories.edit', $category->id)}}" class="px-4 py-2 bg-red-500 hover:bg-red-300 rounded text-white">Edit</a>