Register the primary database bindings.

@return void
497342
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->container['db.factory'] = function ($container) {
            return new ConnectionFactory($container);
        };

        // 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->container['db'] = function ($container) {
            return new DatabaseManager($container, $container['db.factory']);
        };

        $this->container['db.connection'] = function ($container) {
            return $container['db']->connection();
        };
    }
719973
private function registerArcanesoftDatabase()
    {
        // Keep it or using a real DBMS ?
        $connection = $this->config()->get('core.database.default', 'sqlite');

        $this->config()->set(
            'database.connections.arcanesoft',
            $this->config()->get("core.database.connections.{$connection}")
        );
    }
496780
protected function registerBindings()
    {
        $binding = config('binding')?: [];

        foreach($binding as $contract => $implementation) {
            $this->bind($contract, $implementation);
        }
    }
12417
private function registerRepository()
    {
        $this->app->singleton('migration.repository', function ($app) {
            $table = $app['config']['database.migrations'];

            return new DatabaseMigrationRepository($app['db'], $table);
        });
    }
796189
private function registerControllers()
    {
        $this->_controller = new Controller();
        $this->_controller->load($this->_router,
        $this->_config->get('basepath'));
    }
1153466
protected function registerBaseTenantBindings()
    {
        $this->singleton(TenantContract::class, function ($app) {
            return new Tenant(new NullUser(), new NullTenant(), new NullTenant());
        });

        $this->alias(TenantContract::class, 'auth.tenant');
    }
996518
protected function registerCustomBindings(): void
    {
        $entityServiceFactory = $this->app->make(IEntityServiceFactory::class);

        foreach (config('laravel_entity_services.bindings') as $className => $entityService) {
            $entityServiceFactory->register($className, $entityService);
        }
    }
133780
protected function registerRouteBindings()
    {
        Routes\Admin\UsersRoutes::bindings();
        Routes\Admin\RolesRoutes::bindings();
        Routes\Admin\PermissionsRoutes::bindings();
    }
50535
public function boot()
    {
        $this->registerMiddleware();
        $this->registerViewPath();
        $dbFactory = $this->app[EloquentFactory::class];
        $path = __DIR__ . "/../database/factories";
        $dbFactory->load($path);

    }
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'));
    }
291625
protected function registerDatabaseService(): void
    {
        $this->app->alias('db', \Illuminate\Database\ConnectionResolverInterface::class);
        $this->app->register(\Illuminate\Database\DatabaseServiceProvider::class);

        if (File::exists($this->app->databasePath('seeds'))) {
            collect(File::files($this->app->databasePath('seeds')))->each(
                function ($file) {
                    File::requireOnce($file);
                }
            );
        }
    }
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);
    }
1086179
protected function registerMigrationService(): void
    {
        $config = $this->app['config'];
        $config->set('database.migrations', $config->get('database.migrations') ?: 'migrations');
        $this->app->register(\Illuminate\Database\MigrationServiceProvider::class);

        $this->app->alias(
            'migration.repository',
            \Illuminate\Database\Migrations\MigrationRepositoryInterface::class
        );

        $this->app->singleton(
            'migrator',
            function ($app) {
                $repository = $app['migration.repository'];

                return new Migrator($repository, $app['db'], $app['files']);
            }
        );

        $this->app->alias(
            'migrator',
            \Illuminate\Database\Migrations\Migrator::class
        );
    }
417180
public function register()
    {
        // Set resolver for MySQL
        Connection::resolverFor('mysql', function ($connection, $database, $prefix = '', array $config = []) {
            $connection = new MySqlConnection($connection, $database, $prefix, $config);

            // Add Doctrine types for better support
            $this->addDoctrineTypes($connection);

            return $connection;
        });
    }
148162
protected function registerRegistry()
    {
        $app = app();

		$this->app->singleton('registry', function ($app) {

			$config = $app->config->get('registry', array());

			return new Registry($app['db'], $app['registry.cache'], $config);

		});

    }
317922
public function register()
    {
        foreach ($this->commands as $binding => $command) {
            $bind    = $this->prefix . $binding;
            $command = '\\' . $this->namespace . '\\' . $command . $this->commandSuffix;
            unset($this->commands[ $binding ]);
            $this->commands[ $bind ] = $command;
            $this->app->singleton($bind, $command);
        }

        $this->commands(array_keys($this->commands));
    }
1090127
protected function registerRepository()
    {
        $this->app->singleton('mapping.repository', function ($app) {
            $table = $app['config']['plastic.mappings'];

            return new Mappings($app['db'], $table);
        });
    }