Show 404 Page in Laravel 5
4 answers
I am working on Laravel 5.2 and the answer I got here worked for me.
You need to change the render method in app / Exceptions / Handler.php.
public function render($request, Exception $e)
{
if ($e instanceof \Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException)
{
return response(view('errors.404'), 404);
}
return parent::render($request, $e);
}
abort(404)
didn't work for me. It looks like this method has been removed in Laravel 5.
0
source to share