jeudi 21 juillet 2016

Error when sending to 404 page : Laravel 5.2

My URL is below.

http://localhost:70/Learning/public/ededrf

My code is below.

public function report(Exception $e)
{
    $error = $e;
    if($e->getStatusCode() == 404) {
        \App::abort(404);
        return;
    }
    parent::report($e);
}

There is no such above URL in my route list. So it should give 404 error. But I am getting error attached below. .I have confirmed that the status code is coming 404. I got to know about it by writing dd($e->getStatusCode()); in report method.

Question: How can I redirect it to 404 page?

enter image description here



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire