framework
framework copied to clipboard
Handling missing routes in Laravel
I have added the following code in my Handler.php file to handle missing routes.
public function render($request, Exception $e)
{
if($e instanceof \Symfony\Component\HttpKernel\Exception\NotFoundHttpException)
{
return Response::make(view('index'));
}
return parent::render($request, $e);
}
But it's giving me an error .. I have attached a screen shot.. any guesses?

Or you can just add a resources/views/errors/404.blade.php file...?
Ask on the forums please.
I want to redirect all the missing routes to index view so that further angular'll handle the routing.
@GrahamCampbell okay.