I am getting 500 page at every error below i have pasted the code for handler which i thing is the issue kindly guide.I am not getting sort of error rather then 500 page.
public function renderError(Request $request, Exception $exception) {
if (App::environment() === 'local' || App::runningInConsole()) {
return parent::render($request, $exception);
}
if (($exception instanceof NotFoundHttpException)
|| ($exception instanceof ModelNotFoundException)) {
return response(view('errors.404'), 404);
} elseif ($exception instanceof BadRequestHttpException) {
return response(view('errors.400'), 400);
} elseif ((
($exception instanceof HttpException)
&& ($exception->getStatusCode() === 403))
|| ($exception instanceof AccessDeniedHttpException)) {
return response(view('errors.403'), 403);
} elseif ($exception instanceof TooManyRequestsHttpException) {
return response('Too many requests, please wait for a little while and try again.', 429);
} elseif ($exception instanceof HttpResponseException) {
return $exception->getResponse();
} else {
return response(view('errors.500'), 500);
}
}
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire