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,
            ]);
        }
    }