add fallback route

This commit is contained in:
Constantin Plaiasu 2024-08-28 03:05:53 +03:00
parent 9c0df39378
commit 41a569493a
2 changed files with 17 additions and 2 deletions

View file

@ -4,13 +4,19 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="google" content="notranslate">
<meta property="og:url" content="{{url()->current()}}">
<meta property="og:title" content="{{$meta['title']}}">
<meta property="og:description" content="{{$meta['description']}}">
<meta property="og:type" content="website">
<meta property="og:site_name" content="{{ config('app.name') }}">
<meta name="twitter:card" content="summary">
@if(request()->routeIs('fallback'))
<meta property="og:url" content="{{ route('home') }}">
<link rel="canonical" href="{{ route('home') }}">
@else
<meta property="og:url" content="{{ url()->current() }}">
<link rel="canonical" href="{{ url()->current() }}">
@endif
<link href="{{ asset('images/favicon.png') }}" rel="icon" type="image/png">
<title>{{$meta['title']}}</title>
<meta name="description" content="{{$meta['description']}}">

View file

@ -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');