I am opening a page which is not present in my application and in order to get rid of 404 error, I wrote below code.
public function report(Exception $exception)
{
if($this->isHttpException($exception)) {
switch ($exception->getStatusCode()) {
case '404':
return \Response::view('errors.404');
}
}
parent::report($exception);
}
Directory structure is like below and you could see there is 404 Blade inside errors directory
My Directory Structure here. Please click it to view the details
When I run the above code, it shows below error.
View [errors.404] not found
Am I missing something?
Thank you very much in advance for any suggestion.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire