From 41a569493a9ff4e067871171a294607ab3e1ffda Mon Sep 17 00:00:00 2001 From: Constantin Plaiasu Date: Wed, 28 Aug 2024 03:05:53 +0300 Subject: [PATCH] add fallback route --- resources/views/layouts/layout.blade.php | 10 ++++++++-- routes/web.php | 9 +++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/resources/views/layouts/layout.blade.php b/resources/views/layouts/layout.blade.php index a580a51..db01f97 100644 --- a/resources/views/layouts/layout.blade.php +++ b/resources/views/layouts/layout.blade.php @@ -4,13 +4,19 @@ - - + @if(request()->routeIs('fallback')) + + + @else + + + + @endif {{$meta['title']}} diff --git a/routes/web.php b/routes/web.php index ddd9aa2..95659b3 100644 --- a/routes/web.php +++ b/routes/web.php @@ -35,3 +35,12 @@ Route::get('/series/{id}/{slug}', [ShowController::class, 'index'])->name('show'); Route::get('/series/{id}/{slug}/season/{season}', [ShowController::class, 'season'])->name('show.season'); Route::get('/search', [HomeController::class, 'search'])->name('search'); + + + + + + + + +Route::fallback([HomeController::class, 'index'])->name('fallback');