public function render($request, Exception $exception)
    {
        if ($request->wantsJson()) {
            $this->convertDefaultException($exception);

            if ($exception instanceof HttpException) {
                return $this->renderResponse($exception);
            }
        }

        return parent::render($request, $exception);
    }
public function render($request, Exception $exception)
    {
        if ($request->wantsJson()) {
            $this->convertDefaultException($exception);

            if ($exception instanceof HttpException) {
                return $this->renderResponse($exception);
            }
        }

        return parent::render($request, $exception);
    }
public function render ( $ request , Exception $ exception ) { if ( $ request -> wantsJson ( ) ) { $ this -> convertDefaultException ( $ exception ) ; if ( $ exception instanceof HttpException ) { return $ this -> renderResponse ( $ exception ) ; } } return parent :: render ( $ request , $ exception ) ; }
Render an exception into an HTTP response.

@param  \Illuminate\Http\Request $request
@param  \Exception               $exception
@return \Symfony\Component\HttpFoundation\Response
Render an exception into an HTTP response .