Answers for "how send the incorrect url to the page not found in laravel"

PHP
0

how send the incorrect url to the page not found in laravel

In your resources/views/errors folder make sure you have
a 404.blade.php file and if that is not there then create it and put 
something in this file.
  
  
Sepending on your environment setup. FYI, 
in app\Exceptions\Handler.php file the handler
method handles/catches the errors. So check it, you may
customize it, for example:

  public function render($request, Exception $e)
    {
        // Customize it, extra code
        if ($e instanceof AccessDeniedHttpException) {
            return response(view('errors.403'), 403);
        }
        
        // The method has only this line by default
        return parent::render($request, $e);
    }
Posted by: Guest on February-15-2021

Code answers related to "how send the incorrect url to the page not found in laravel"

Browse Popular Code Answers by Language