Register the package requirements.

@see ChunkUploadServiceProvider::registerConfig()
7590
public function register()
    {
        // Register the commands
        $this->commands([
            ClearChunksCommand::class,
        ]);

        // Register the config
        $this->registerConfig();

        // Register the config via abstract instance
        $this->app->singleton(AbstractConfig::class, function () {
            return new FileConfig();
        });

        // Register the config via abstract instance
        $this->app->singleton(ChunkStorage::class, function ($app) {
            /** @var AbstractConfig $config */
            $config = $app->make(AbstractConfig::class);

            // Build the chunk storage
            return new ChunkStorage($this->disk($config->chunksDiskName()), $config);
        });

        /*
         * Bind a FileReceiver for dependency and use only the first object
         */
        $this->app->bind(FileReceiver::class, function ($app) {
            /** @var Request $request */
            $request = $app->make('request');

            // Get the first file object - must be converted instances of UploadedFile
            $file = array_first($request->allFiles());

            // Build the file receiver
            return new FileReceiver($file, $request, HandlerFactory::classFromRequest($request));
        });
    }
1086407
protected function registerConfig()
    {
        $configPath = __DIR__ . '/../config/handlebars.php';

        $this->mergeConfigFrom($configPath, 'handlebars');

        $this->publishes([$configPath => config_path('handlebars.php')], 'laravel-handlebars');
    }
1144281
public function loadConfiguration(): void
	{
		$builder = $this->getContainerBuilder();
		$config = $this->validateConfig($this->defaults);

		Validators::assertField($config, 'middlewares', 'array');

		// Register middleware chain builder
		$chain = $builder->addDefinition($this->prefix('chain'))
			->setAutowired(false);

		if ($config['debug'] !== true) {
			$chain->setFactory(ChainBuilder::class);
		} else {
			$chain->setFactory(DebugChainBuilder::class);

			$builder->addDefinition($this->prefix('middlewaresPanel'))
				->setFactory(MiddlewaresPanel::class, [$chain]);
		}
	}
142912
protected function registerConfig() {
        $config = new Configuration($this->configFile);
        $this->container->set('config', function() use ($config) {
                return $config;
        });
    }
1350706
public function register()
    {
        $this->app->bind(LoaderInterface::class, ArrayLoader::class);

        $this->registerExtensionConfig();
        $this->registerExtensionFinder();
        $this->registerExtensionManager();
        $this->registerExtensionDispatcher();
        $this->registerExtensionBootstrap();
        $this->registerComposerHandler();
        $this->registerComponentsRepository();
    }
799183
private function registerCompressorProvider() {
        $this->app->bind(\BackupManager\Compressors\CompressorProvider::class, function () {
            $provider = new Compressors\CompressorProvider;
            $provider->add(new Compressors\GzipCompressor);
            $provider->add(new Compressors\NullCompressor);
            return $provider;
        });
    }
1035876
public function registerConfiguredProviders()
	{
		$manifestPath = $this->getCachedServicesPath();

		(new ProviderRepository($this, new Filesystem, $manifestPath))
					->load($this->config['app.providers']);
	}
1293082
public function register()
	{
		$this->app->bindShared('package.creator', function($app)
		{
			return new PackageCreator($app['files']);
		});

		$this->app->bindShared('command.workbench', function($app)
		{
			return new WorkbenchMakeCommand($app['package.creator']);
		});

		$this->commands('command.workbench');
	}
321459
protected function registerPackagesFromConfiguration($packageStatesConfiguration)
    {
        foreach ($packageStatesConfiguration['packages'] as $composerName => $packageStateConfiguration) {
            $this->registerPackageFromStateConfiguration($composerName, $packageStateConfiguration);
        }
    }
238336
protected function registerConfig()
    {
        $this->mergeConfigFrom(\realpath(__DIR__.'/../../config/api.php'), 'api');

        if (! $this->app->runningInConsole() && empty($this->config('prefix')) && empty($this->config('domain'))) {
            throw new RuntimeException('Unable to boot ApiServiceProvider, configure an API domain or prefix.');
        }
    }
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
        );
    }
160182
protected function registerConfigPublishCommand(): void
    {
        $this->app->singleton('command.config.publish', function (Application $app) {
            return new ConfigPublishCommand($app->make('config.publisher'));
        });
    }
781334
protected function registerConfigPublisher()
    {
        $this->app->singleton('config.publisher', function (Application $app) {
            $path = $app->configPath();

            // Once we have created the configuration publisher, we will set the default
            // package path on the object so that it knows where to find the packages
            // that are installed for the application and can move them to the app.
            $publisher = new ConfigPublisher($app->make('files'), $path);

            $publisher->setPackagePath($app->basePath().'/vendor');

            return $publisher;
        });
    }
224132
public function register() : void
    {
        $environment = $this->app->environment();

        $providers = $this->app['config']->get('app.' . $environment . '_providers', []);

        foreach ($providers as $provider) {
            $this->app->register($provider);
        }

        $facades = $this->app['config']->get('app.' . $environment . '_aliases', []);

        foreach ($facades as $class => $name) {
            AliasLoader::getInstance()->alias($class, $name);
        }
    }
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);
                    }
                }
            }
        });
    }
785703
public function register()
    {
        $packages = $this->repository->enabled();

        $packages->each(function($properties)
        {
            $this->registerServiceProvider($properties);
        });
    }
1067593
public function register()
	{
        // Find path to the package
        $filename = with(new \ReflectionClass('\SRLabs\Validator\ValidatorServiceProvider'))->getFileName();
        $path = dirname($filename);

        // Load the Package
        $this->package('srlabs/validator');

        // Register the FormValidationFailedException handler
        $this->app->error(function( FormValidationFailedException $exception)
        {
            //dd($exception->getErrors());
            $this->redirect = $this->app->make('redirect');
            return $this->redirect->back()->withInput()->withErrors($exception->getErrors());
        });
	}