Adldap\Laravel\AdldapServiceProvider::register PHP Method

register() public method

Register the service provider.
public register ( ) : void
return void
    public function register()
    {
        // Bind the Adldap instance to the IoC
        $this->app->singleton('adldap', function (Application $app) {
            $config = $app->make('config')->get('adldap');
            // Verify configuration exists.
            if (is_null($config)) {
                $message = 'Adldap configuration could not be found. Try re-publishing using `php artisan vendor:publish --tag="adldap"`.';
                throw new ConfigurationMissingException($message);
            }
            return $this->addProviders($this->newAdldap(), $config['connections']);
        });
        // Bind the Adldap contract to the Adldap object
        // in the IoC for dependency injection.
        $this->app->singleton(AdldapInterface::class, 'adldap');
    }