protected function transformException(Exception $exception)
    {
        if (Request::capture()->wantsJson()) {
            $this->transformAuthException($exception);
            $this->transformEloquentException($exception);
            $this->transformValidationException($exception);
        }
    }
protected function transformException(Exception $exception)
    {
        if (Request::capture()->wantsJson()) {
            $this->transformAuthException($exception);
            $this->transformEloquentException($exception);
            $this->transformValidationException($exception);
        }
    }
protected function transformException ( Exception $ exception ) { if ( Request :: capture ( ) -> wantsJson ( ) ) { $ this -> transformAuthException ( $ exception ) ; $ this -> transformEloquentException ( $ exception ) ; $ this -> transformValidationException ( $ exception ) ; } }
Transform a Laravel exception into an API exception.

@param  Exception $exception
@return void
Transform a Laravel exception into an API exception .