app/Exceptions/Handler.php
/**
     * Render an exception into an HTTP response.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Exception  $e
     * @return \Illuminate\Http\Response
     */
Render an exception into an HTTP response.
Render an exception into an HTTP response .
public function render($request, Exception $e)
    {
        if($e instanceof NotFoundHttpException)
        {
            return response(array("message" => "Invalid URI"), 404);
        }
        if ($e instanceof AuthenticationException) {
            return response(array("message" => "Unauthorised"), 401);
        }
        if($e instanceof QueryException)
        {
            return response(array("message" => "Bad Request"), 400);
        }
        if($e instanceof \ErrorException)
        {
            return response(array("message" => "Bad Request"), 400);
        }
            return parent::render($request, $e);
    }
public function render ( $ request , Exception $ e ) { if ( $ e instanceof NotFoundHttpException ) { return response ( array ( " message " => " Invalid URI " ) , 404 ) ; } if ( $ e instanceof AuthenticationException ) { return response ( array ( " message " => " Unauthorised " ) , 401 ) ; } if ( $ e instanceof QueryException ) { return response ( array ( " message " => " Bad Request " ) , 400 ) ; } if ( $ e instanceof \ ErrorException ) { return response ( array ( " message " => " Bad Request " ) , 400 ) ; } return parent :: render ( $ request , $ e ) ; }
Render an exception into an HTTP response.
Render an exception into an HTTP response .