I am using Laravel version 5.2 and don't know how to redirect Laravel default page to my template 404 page
I am using Laravel version 5.2 and don't know how to redirect Laravel default page to my template 404 page
Modify app/Exceptions/Handler.php and add some lines as below:-
public function render($request, Exception $e)
{
if ($e instanceof \Symfony\Component\HttpKernel\Exception\NotFoundHttpException)
{
return redirect('/');
}
return parent::render($request, $e); }
Use your route name in place of / where you want to redirect.