404 page in laravel
404 page in laravel
Directory
app/Exceptions/Handler.php
OLD
public function render($request, Exception $exception)
{
return parent::render($request, $exception);
}
Replace with
public function render($request, Exception $exception)
{
if ($this->isHttpException($exception)) {
if ($exception->getStatusCode() == '404') {
return response()->view('pages.' .'404', [], 404);
}
}
pages < directory name
404 pag ename
Directory
app/Exceptions/Handler.php
OLD
public function render($request, Exception $exception)
{
return parent::render($request, $exception);
}
Replace with
public function render($request, Exception $exception)
{
if ($this->isHttpException($exception)) {
if ($exception->getStatusCode() == '404') {
return response()->view('pages.' .'404', [], 404);
}
}
pages < directory name
404 pag ename
Comments
Post a Comment