Laravel looks for resources/views/errors/404.blade.php (example)
Returns an HTTP 404 response with the rendered view
Common Handling
app/Exceptions/Handler.php : converts exceptions into HTTP responses.
<?php
namespace App\Exceptions;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; use Illuminate\Http\Exceptions\ThrottleRequestsException; use Illuminate\Session\TokenMismatchException; use Illuminate\Auth\Access\AuthorizationException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\ServiceUnavailableHttpException; use Throwable;
class Handler extends ExceptionHandler { /** * The list of the inputs that are never flashed to the session on validation exceptions. * * @var array<int, string> */ protected $dontFlash = [ 'current_password', 'password', 'password_confirmation', ];
/** * Register the exception handling callbacks for the application. */ public function register(): void { $this->reportable(function (Throwable $e) { // });
{{-- Title --}} <h1 class="fw-bold fs-2x text-gray-900 mb-3">Page Not Found</h1>
{{-- Description --}} <p class="text-muted fs-5 mb-8 fw-semibold"> Oops! The page you're looking for doesn't exist.<br> It may have been moved, deleted, or never existed. </p>