code: protected function bootResponseMacro()
      {
          Response::macro('jsonApi', function ($api = null) {
              return json_api($api)->getResponses()->withEncodingParameters(
                  app(EncodingParametersInterface::class)
              );
          });
      }
docs: Register a response macro.
  
  @return void