Why laravel returns code 200 instead of 404?

Guys, good evening. Please tell me how to get laravel code 404 instead of 200.
In the handler written:
if ($this->isHttpException($e)) {
 switch ($e->getStatusCode()) {

 // not authorized
 case '403':
 return \Response::view('errors.403',array(),403);
break;

 // not found
 case '404':
 return \Response::view('errors.404',array(),404);
break;

 // internal error
 case '500':
 return \Response::view('errors.500',array(),500);
break;

default:
 return $this->renderHttpException($e);
break;
}
 }
March 23rd 20 at 19:04
1 answer
March 23rd 20 at 19:06
Check the output of the error class. If I remember correctly, it is used for 404 exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException

Find more questions by tags Laravel