Skip to content

Commit

Permalink
Not found page fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Raccoon254 committed Jun 9, 2024
1 parent 8534679 commit 0dc3c68
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/Http/Controllers/PagesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ public function contact(): View
return view('contact');
}

public function notfound(): View
{
return view('errors.404');
}

public function howItWorks(): View
{
$steps = [
Expand Down
18 changes: 18 additions & 0 deletions resources/views/errors/404.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<x-logged-out>
<x-slot name="title">
404 Not found - Scholarspace
</x-slot>

<div class="container text-black/80 mx-auto px-4 py-8 md:py-10">
<h1 class="text-5xl text-blue-500 font-bold mb-4">Oops! Page not found.</h1>
<p class="mb-6">We couldn't find the page you were looking for. This is either because:</p>
<ul class="list-disc list-inside mb-6">
<li>There is an error in the URL entered into your web browser. Please check the URL and try again.</li>
<li>The page you are looking for has been moved or deleted.</li>
</ul>
<p class="mb-4">You can return to our homepage by clicking the button below </p>
<a href="{{ route('home') }}" class="custom-btn">
Here <i class="fa fa-home"></i>
</a>
</div>
</x-logged-out>
1 change: 1 addition & 0 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,5 @@
Route::get('/services', [PagesController::class, 'services'])->name('services');
Route::get('/about', [PagesController::class, 'about'])->name('about');
Route::get('/faq', [PagesController::class, 'faq'])->name('faq');
Route::any('{catchall}', [PagesController::class, 'notfound'])->where('catchall', '.*');
require __DIR__.'/auth.php';

0 comments on commit 0dc3c68

Please sign in to comment.