I have a problem with http exception. Actually, the 404 view I created does not appear. Only the default view appears (when i write in the url http://127.0.0.1:8000/fr/sdfsdf).
the path of view : resources/views/errors/404.blade.php
the code of Handler :
...
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
class Handler extends ExceptionHandler
{
...
public function render($request, Exception $exception){
if ($this->isHttpException($exception))
{
if($exception instanceof NotFoundHttpException)
{
return response()->view('errors.404', [], 404);
}
}
return parent::render($request, $exception);
}
}
thanks to everyone for your help
I did my research to find a solution, but I couldn't find anything.
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2JaTL73
via IFTTT
Aucun commentaire:
Enregistrer un commentaire