redirect 404 in laravel
return abort(404, 'Page not found.');
return abort(403, 'Unauthorized action.');
"create a resources/views/errors/404.blade.php"
redirect 404 in laravel
return abort(404, 'Page not found.');
return abort(403, 'Unauthorized action.');
"create a resources/views/errors/404.blade.php"
how to set 404 page in laravel
/**
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Exception $exception
* @return \Illuminate\Http\Response
*/
public function render($request, Exception $exception)
{
if ($this->isHttpException($exception)) {
if ($exception->getStatusCode() == 404) {
return response()->view('errors.' . '404', [], 404);
}
}
return parent::render($request, $exception);
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us