jeudi 25 juillet 2019

Laravel NotFoundHttpException Handling

I am Unable to handle NotFoundHttpException in Laravel

I have already tried to handle it through render() in Handler.php


// Handler.php 
// render()
==============

public function render($request, Exception $e)
    {
        if($e instanceof NotFoundHttpException){
            return response('Not Found');
        }
        return parent::render($request,$e);
   }

It should return the response 'Not Found'. But it is returning

Class 'Symfony\Component\HttpKernel\Exception\NotFoundHttpException' not found



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire