I am Unable to handle NotFoundHttpException in Laravel
I have already tried to handle it through render() in Handler.php
// Handler.php
// render()
==============
public function render($request, Exception $e)
{
if($e instanceof NotFoundHttpException){
return response('Not Found');
}
return parent::render($request,$e);
}
It should return the response 'Not Found'. But it is returning
Class 'Symfony\Component\HttpKernel\Exception\NotFoundHttpException' not found
Which means that NotFoundHttpException class cannot be found in vendor folder, I tried to look for the class in the path specified but I could not find it.