Dingo\Api\Provider\DingoServiceProvider::register PHP Method

register() public method

Register the service provider.
public register ( ) : void
return void
    public function register()
    {
        $this->registerConfig();
        $this->registerClassAliases();
        $this->app->register(RoutingServiceProvider::class);
        $this->app->register(HttpServiceProvider::class);
        $this->registerExceptionHandler();
        $this->registerDispatcher();
        $this->registerAuth();
        $this->registerTransformer();
        $this->registerDocsCommand();
        if (class_exists('Illuminate\\Foundation\\Application', false)) {
            $this->commands(['Dingo\\Api\\Console\\Command\\Cache', 'Dingo\\Api\\Console\\Command\\Routes']);
        }
    }

Usage Example

Example #1
0
 /**
  * Register the service provider.
  *
  * @return void
  */
 public function register()
 {
     parent::register();
     $this->app->singleton('api.router.adapter', function ($app) {
         return new LumenAdapter($app, new StdRouteParser(), new GcbDataGenerator(), 'FastRoute\\Dispatcher\\GroupCountBased');
     });
 }
All Usage Examples Of Dingo\Api\Provider\DingoServiceProvider::register