I am upgrading from L4 to L5. I had a global NotFoundHttpException in L4 ( app/global.php) and now I added that in App\Exceptions\Handler.php.
public function render($request, Exception $e)
{
if ($e instanceof NotFoundHttpException)
{
return Response::make(['error'=>'not_found','error_message'=>'Please check the URL you submitted'], 404);
}
return parent::render($request, $e);
}
But I am not able to catch this error. It always shows the 404 page. What am I missing ?
if ($e instanceof \Symfony\Component\HttpKernel\Exception\NotFoundHttpException)
{
return Response::make(['error'=>'not_found','error_message'=>'Please check the URL you submitted'], 404);
}