I would like to create custom error views, I have created the locations in Handler.php
but when I have an error: ERROR_EXCEPTION is not redirected to the error view: 500
Should I create some extra view for this error?
my code is:
public function render($request, Exception $exception)
{
if ($exception->getStatusCode() == 500) {
return response()->view('errors.500', [], 500);
}
if ($exception->getStatusCode() == 404) {
return response()->view('errors.404', [], 404);
}
if ($exception->getStatusCode() == 503) {
return response()->view('errors.503', [], 503);
}
return parent::render($request, $exception);
}