Register Providers
1408
function registerProviders () {
  Object.keys(settings.providers).forEach(function (id) {
    var providerConf = settings.providers[id]
    var provider = providers[id] ? providers[id] : providerConf

    var strategy = protocols.initialize(id, provider, providerConf)
    strategies[id] = strategy
  })
}
272962
public function registerObserverServiceProvider()
    {
        if (! $this->files->exists(app_path('Providers/ObserverServiceProvider.php'))) {
            $this->call('make:provider', [
                'name' => 'ObserverServiceProvider',
            ]);
            $this->info('Please register your ObserverServiceProvider in config/app.php.');
            $this->info('Do run php artisan config:cache to make sure ObserverServiceProvider is loaded.');
        } else {
            $this->info(app_path('Providers/ObserverServiceProvider.php') . ' already exist.');
        }
    }
999624
protected function registerOAuthProviders()
	{
		$this->app->register(new FluentStorageServiceProvider($this->app));
		$this->app->register(new OAuth2ServerServiceProvider($this->app));
	}
1293073
public function registerConfiguredProviders()
    {
        foreach ([
                     CacheProvider::class,
                     PartProvider::class,
                     SchedulingProvider::class,
                     ViewProvider::class,
                     EventProvider::class,
                     DatabaseProvider::class,
                     LogProvider::class,
                     HttpProvider::class,
                     SocketProvider::class,

                     ExtendProvider::class,
                 ] as $provider) {
            $this->register($provider);
        }
    }
1320941
private function registerSocialProviders()
    {
        foreach ($this->enabled as $provider) {
            $providerClass =  $provider . 'SocialProvider';
            $this->app->bind($providerClass, function ($app) use ($providerClass) {
                $providerClassWithNamespace = 'Acacha\LaravelSocial\SocialProviders\\' . $providerClass;
                return new $providerClassWithNamespace($app->make('Laravel\Socialite\Contracts\Factory'));
            });
        }
    }
811761
protected function registerThirdPartyProviders()
    {
        if (
            'testing' == $this->app->environment()
            ||
            version_compare(Application::VERSION, '5.5.0', '<')
        ) {
            $this->registerMenuComponent();
            $this->registerFormComponent();
            $this->registerFlashComponent();
            $this->registerBreadcrumbsComponent();
            $this->registerSluggableComponent();
        }

        $this->mergeBreadCrumbsConfig();
    }
677248
public function register()
    {
        $this->instances = [];

        foreach ($this->providers as $provider) {
            Zilf::$container->register($provider, $provider);
            $this->instances[] = Zilf::$container->get($provider)->register();
        }
    }
1124313
public function register()
    {
        $this->app->bindShared('packages', function ($app)
        {
            $repository = new Repository($app['config'], $app['files']);

            return new PackageManager($app, $repository);
        });
    }
163615
def set_providers(self, *providers):
        """"""
        if self.providers:
            self.clear()
        for provider in providers:
            self.add(provider)
1267766
public function register()
    {
        //Load helpers
        Helper::loadModuleHelpers(__DIR__);

        $this->app->singleton(ExceptionHandler::class, config('webed.exception_handler', Handler::class));

        //Merge configs
        $configs = split_files_with_basename($this->app['files']->glob(__DIR__ . '/../../config/*.php'));

        foreach ($configs as $key => $row) {
            $this->mergeConfigFrom($row, $key);
        }

        /**
         * @var Router $router
         */
        $router = $this->app['router'];
        $router->pushMiddlewareToGroup('web', StartSessionMiddleware::class);

        /**
         * Base providers
         */
        $this->app->register(HookServiceProvider::class);
        $this->app->register(ConsoleServiceProvider::class);
        $this->app->register(MiddlewareServiceProvider::class);
        $this->app->register(RouteServiceProvider::class);
        $this->app->register(ValidateServiceProvider::class);
        $this->app->register(ComposerServiceProvider::class);
        $this->app->register(RepositoryServiceProvider::class);
        $this->app->register(CollectiveServiceProvider::class);
        $this->app->register(BootstrapModuleServiceProvider::class);

        /**
         * Other module providers
         */
        $this->app->register(\WebEd\Base\Shortcode\Providers\ModuleProvider::class);
        $this->app->register(\WebEd\Base\Caching\Providers\ModuleProvider::class);
        $this->app->register(\WebEd\Base\ACL\Providers\ModuleProvider::class);
        $this->app->register(\WebEd\Base\ModulesManagement\Providers\ModuleProvider::class);
        $this->app->register(\WebEd\Base\AssetsManagement\Providers\ModuleProvider::class);

        $this->app->register(\WebEd\Base\Hook\Providers\ModuleProvider::class);
        $this->app->register(\WebEd\Base\Menu\Providers\ModuleProvider::class);
        $this->app->register(\WebEd\Base\Settings\Providers\ModuleProvider::class);
        $this->app->register(\WebEd\Base\ThemesManagement\Providers\ModuleProvider::class);
        $this->app->register(\WebEd\Base\Users\Providers\ModuleProvider::class);

        foreach (config('webed.external_core', []) as $item) {
            $this->app->register($item);
        }
    }
1268102
public function register()
    {
        $this->config = $this->app->make('config');
        $this->packages = $this->config->get('domains.user-binding');

        $files = \File::allFiles(config_path('domains'));

        foreach ($files as $file) {
            if ($bindings = $this->config->get('domains.'.basename($file->getFilename(), '.php'))) {
                if (array_has($bindings, 'providers')) {
                    $this->provideService(array_get($bindings, 'providers'));
                }

                if (array_has($bindings, 'repositories')) {
                    $this->provideRepositories(array_get($bindings, 'repositories'));
                }

                if (array_has($bindings, 'eloquent_repositories')) {
                    $this->provideEloquentRepositories(array_get($bindings, 'eloquent_repositories'));
                }
            }
        }

        if ($this->app->runningInConsole()) {
            $this->commands([
                GenerateDomain::class,
            ]);
        }
    }
1042035
public function register()
    {
        $dependencies = [
            ArtisanServiceProvider::class,
            ContainersServiceProvider::class,
            EventServiceProvider::class,
            BreadcrumbsServiceProvider::class => [
                'Breadcrumbs' => BreadcrumbsFacade::class,
            ],
            HtmlServiceProvider::class => [
                'Html' => HtmlFacade::class,
                'Form' => FormFacade::class,
            ],
            PaperclipServiceProvider::class,
            MenusServiceProvider::class => [
                'AdminNav' => MenuFacade::class,
            ],
            GravatarServiceProvider::class => [
                'Gravatar' => Gravatar::class,
            ],
        ];

        array_walk($dependencies, function ($package, $provider) {
            if (is_string($package) && is_numeric($provider)) {
                $provider = $package;
                $package = null;
            }

            if (!$this->app->getProvider($provider)) {
                $this->app->register($provider);

                if (is_array($package)) {
                    foreach ($package as $alias => $facade) {
                        if (class_exists($alias)) {
                            continue;
                        }

                        class_alias($facade, $alias);
                    }
                }
            }
        });
    }
139864
public function register($provider)
    {
        if (! $provider instanceof ServiceProvider) {
            $provider = new $provider($this);
        }

        if (array_key_exists($providerName = get_class($provider), $this->loadedProviders)) {
            return;
        }

        $this->loadedProviders[$providerName] = $provider;

        if (method_exists($provider, 'register')) {
            $provider->register();
        }

        if ($this->booted) {
            $this->bootProvider($provider);
        }
    }
613042
public function register()
    {

        $app = $this->app;

        foreach ($app->getProviders() as $provider) {

            $provider = new $provider($app);

            if (!$provider instanceof ServiceProvider) {
                throw new ProviderException(sprintf('Your %s proiver must be a instance of ServiceProvider', get_class($provider)));
            }


            $provider->register();

            $app = $provider->app();
        }
    }
847962
protected function registerProviders(Collection $providers)
    {
        // loop through providers to be registered.
        $providers->each(function ($providerClass) {
            // register a provider class.
            $this->app->register($providerClass);
        });
    }
944738
public function registerProviders()
	{
		$providers = $this['config']->get('app.providers');

		foreach ($providers as $provider) {
			$this->providers[$provider] = new $provider($this);
			$this->providers[$provider]->register();
		}
	}
498997
private function registerProvider()
    {
        $app = $this->app;

        // Pick the correct service provider for the current verison of Laravel
        $this->provider = (version_compare($app::VERSION, '5.0', '<'))
            ? new ImgurServiceProviderLaravel4($app)
            : new ImgurServiceProviderLaravel5($app);
    }