Register the primary database bindings.

@return void
422366
protected function registerConnectionServices()
    {
        // The connection factory is used to create the actual connection instances on
        // the database. We will inject the factory into the manager so that it may
        // make the connections while they are actually needed and not of before.
        $this->getContainer()->share('db.factory', ConnectionFactory::class);

        // The database manager is used to resolve various connections, since multiple
        // connections might be managed. It also implements the connection resolver
        // interface which may be used by other components requiring connections.
        $this->getContainer()->share('db', DatabaseManager::class)
            ->withArgument(Application::class)
            ->withArgument(ConnectionFactory::class);

        $this->getContainer()->share('db.connection', function () {
            return app('db')->connection();
        });
    }
366564
protected function registerBaseBindings()
    {
        static::setInstance($this);

        $this->instance('app', $this);

        $this->instance(Container::class, $this);

        $this->instance(PackageManifest::class, new PackageManifest(
            new Filesystem, $this->basePath(), $this->getCachedPackagesPath()
        ));
    }
1287861
protected function registerBaseBindings()
    {
        static::setInstance($this);

        $this->instance('app', $this);

        $this->instance(Container::class, $this);
    }
530708
public function register()
	{
		$this->app['db'] = function($app)
		{
			// @FIXME: this isn't pretty, but it will shim the removal of the old mysql_* calls from php
			$driver = (Config::get('dbtype') == 'mysql') ? 'pdo' : Config::get('dbtype');

			$options = [
				'driver'   => $driver,
				'host'     => Config::get('host'),
				'user'     => Config::get('user'),
				'password' => Config::get('password'),
				'database' => Config::get('db'),
				'prefix'   => Config::get('dbprefix')
			];

			return Driver::getInstance($options);
		};
	}
673329
public function register(){
        //register commands
        $this->commands([
            Commands\CrudCommand::class,
            Commands\ControllerCommand::class,
            Commands\ServiceCommand::class,
            Commands\ContractCommand::class,
            Commands\ViewCommand::class,
        ]);
        //Merge config
        $this->mergeConfigFrom(
            __DIR__.'/../config/crudable.php', 'crudable'
        );
        //Load config
        $config = $this->app->make('config');
        //Check for auto binding
        if($config->get('crudable.use_auto_binding')){
            //Run contextual binding first
            foreach($config->get('crudable.implementations') as $usage){
                $this->app->when($usage['when'])
                    ->needs(isset($usage['needs'])?$usage['needs']:\Flobbos\Crudable\Contracts\Crud::class)
                    ->give($usage['give']);
            }
            //Run fixed bindings
            foreach($config->get('crudable.bindings') as $binding){
                $this->app->bind($binding['contract'],$binding['target']);
            }
        }
    }
297351
public function register()
    {
        $this->registerFileConfig();
        $this->registerDatabaseConfig();

        // Bind the concrete types
        $this->app->bind('Concrete\Core\Config\Repository\Repository', 'config');
        $this->app->bind('Illuminate\Config\Repository', 'Concrete\Core\Config\Repository\Repository');
    }
1021062
public function register() {
        foreach(Boot::$configs as $path_config => $is_deploy) {
            $path_config = str_replace('\\', '/', $path_config);
            $files       = rglob('*.php', 0, $path_config);
            
            foreach($files as $path) {
                $path = str_replace('\\', '/', $path);
                //                dump($path);
                $file = ltrim(str_replace([$path_config], [''], $path), '/');
                
                $key    = str_replace(['.php', '/',], ['', '.'], $file);
                $config = app('config')->get($key, []);
                //                dd($path, require $path);
                //                dump(require $path, $config, array_merge(require $path, $config));
                app('config')->set($key, array_merge(require $path, $config));
                if($is_deploy) {
                    $this->publishes([$path => config_path($file),], 'config');
                }
            }
        }
        foreach(Boot::$migrations as $path) {
            $this->publishes([
                $path => base_path('database/migrations'),
            ], 'migrations');
        }
    }
996518
protected function registerCustomBindings(): void
    {
        $entityServiceFactory = $this->app->make(IEntityServiceFactory::class);

        foreach (config('laravel_entity_services.bindings') as $className => $entityService) {
            $entityServiceFactory->register($className, $entityService);
        }
    }
770096
protected function registerBindings()
    {
        $this->app->singleton('assetLoader', 'Monarkee\Bumble\Repositories\FieldAssetRepository');

        $this->app->singleton('bumblestr', function ()
        {
            return $this->app->make('Monarkee\Bumble\Support\BumbleStr');
        });

        $this->app->singleton('bumble-gravatar', function ()
        {
            return $this->app->make('Monarkee\Bumble\Support\Gravatar');
        });

        $this->app->bind('Monarkee\Bumble\Repositories\ModelRepository', 'Monarkee\Bumble\Repositories\ArrayConfigModelRepository');
    }
884195
public function register()
    {
        $this->app->singleton('Illuminate\Database\ConnectionInterface', function () {
            $factory = new ConnectionFactory($this->app);

            $connection = $factory->make($this->app['config']->get('fluxbb.database'));
            $connection->setEventDispatcher($this->app->make('Illuminate\Contracts\Events\Dispatcher'));
            $connection->setFetchMode(PDO::FETCH_CLASS);

            return $connection;
        });

        $this->app->singleton('Illuminate\Database\ConnectionResolverInterface', function () {
            $resolver = new ConnectionResolver([
                'fluxbb' => $this->app->make('Illuminate\Database\ConnectionInterface'),
            ]);
            $resolver->setDefaultConnection('fluxbb');

            return $resolver;
        });

        if (Core::isInstalled()) {
            $this->app->booting(function () {
                $resolver = $this->app->make('Illuminate\Database\ConnectionResolverInterface');
                Model::setConnectionResolver($resolver);
            });
        }
    }
765420
protected function registerRepository()
    {
        $this->app->bindShared('migration.repository', function($app)
        {
            $table = $app['config']['database.migrations'];

            return new DatabaseMigrationRepository($app['db'], $table);
        });
    }
878406
protected function registerDatabaseDriver()
    {
        $this->app->singleton(
            EntriesRepository::class, DatabaseEntriesRepository::class
        );

        $this->app->singleton(
            ClearableRepository::class, DatabaseEntriesRepository::class
        );

        $this->app->singleton(
            PrunableRepository::class, DatabaseEntriesRepository::class
        );

        $this->app->when(DatabaseEntriesRepository::class)
            ->needs('$connection')
            ->give(config('telescope.storage.database.connection'));

        $this->app->when(DatabaseEntriesRepository::class)
            ->needs('$chunkSize')
            ->give(config('telescope.storage.database.chunk'));
    }
934392
protected function registerProviders(): void
    {
        foreach ($this->providers as $provider) {
            $this->app->register($provider);
        }
    }
886362
public function register()
    {
        $this->registerConnectionServices();
        $this->registerEloquentFactory();
        $this->registerQueueableEntityResolver();

        Model::setConnectionResolver($this->container['db']);
        Model::setEventDispatcher($this->container['events']);
        Model::clearBootedModels();
        Model::observe(InternalObserve::class);
    }
171980
protected function registerBindings()
    {
        $this->app->bind('FluxBB\Models\GroupRepositoryInterface', function ($app) {
            return new GroupRepository($app['cache']);
        });

        $this->app->bind('FluxBB\Models\ConfigRepositoryInterface', function ($app) {
            return new ConfigRepository($app['cache.store'], $app['Illuminate\Database\ConnectionInterface']);
        });

        $this->app->bind('FluxBB\Models\CategoryRepositoryInterface', function ($app) {
            return new CategoryRepository($app['Illuminate\Database\ConnectionInterface']);
        });

        $this->app->bind('FluxBB\Models\ConversationRepositoryInterface', function ($app) {
            return new ConversationRepository($app['Illuminate\Database\ConnectionInterface']);
        });
    }
65664
public function register()
	{
		$this->mergeConfigFrom(__DIR__.'/../config/translation-db.php', 'translation-db');

		$this->registerDatabase();
		$this->registerLoader();

		$this->commands($this->commands);

		$this->app->singleton('translator', function($app)
		{
			$loader = $app['translation.loader'];
			$database = $app['translation.database'];

			// When registering the translator component, we'll need to set the default
			// locale as well as the fallback locale. So, we'll grab the application
			// configuration so we can easily get both of these values from there.
			$locale = $app['config']['app.locale'];

			$trans = new Translator($database, $loader, $locale, $app);

			$trans->setFallback($app['config']['app.fallback_locale']);

			return $trans;
		});


	}
348496
protected function initDatabase()
    {
        $dbConfig = (array) config("database");

        if (count($dbConfig) > 0) {
            $this->db = new Database($dbConfig);
            Model::$db = $this->db;
        }
    }