protected function prepareJsonResponse($request, Exception $e)
    {
        return new JsonResponse(
            $this->convertExceptionToArray($e),
            $this->isHttpException($e) ? $e->getStatusCode() : 500,
            $this->isHttpException($e) ? $e->getHeaders() : [],
            JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES
        );
    }
protected function prepareJsonResponse($request, Exception $e)
    {
        return new JsonResponse(
            $this->convertExceptionToArray($e),
            $this->isHttpException($e) ? $e->getStatusCode() : 500,
            $this->isHttpException($e) ? $e->getHeaders() : [],
            JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES
        );
    }
protected function prepareJsonResponse ( $ request , Exception $ e ) { return new JsonResponse ( $ this -> convertExceptionToArray ( $ e ) , $ this -> isHttpException ( $ e ) ? $ e -> getStatusCode ( ) : 500 , $ this -> isHttpException ( $ e ) ? $ e -> getHeaders ( ) : [ ] , JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES ) ; }
Prepare a JSON response for the given exception.

@param  \Illuminate\Http\Request  $request
@param  \Exception $e
@return \Illuminate\Http\JsonResponse
Prepare a JSON response for the given exception .