Register the application services.
438913
public function register()
    {
        $this->commands('LarsJanssen\UnderConstruction\Commands\SetCodeCommand');
        $this->mergeConfigFrom(__DIR__.'/../config/under-construction.php', 'under-construction');

        $this->app->bind('TransFormer', function ($app) {
            return new TransFormer();
        });

        $routeConfig = [
            'namespace'  => 'LarsJanssen\UnderConstruction\Controllers',
            'prefix'     => 'under',
            'middleware' => [
                'web',
            ],
        ];

        $this->getRouter()->group($routeConfig, function ($router) {
            $router->post('check', [
                'uses' => 'CodeController@check',
                'as'   => 'underconstruction.check',
            ]);

            $router->post('checkiflimited', [
                'uses' => 'CodeController@checkIfLimited',
                'as' => 'underconstruction.checkiflimited',
            ]);

            $router->get('construction', [
                'uses' => 'CodeController@index',
                'as'   => 'underconstruction.index',
            ]);

            $router->get('js', [
                'uses' => 'AssetController@js',
                'as'   => 'underconstruction.js',
            ]);
        });
    }
602790
protected function registerServices(): void
	{
		// Register core services

		$this->serviceRegistrar('core');

		// Register environment specific services

		if($this->isCommandLine())
		{
			$this->registerCLIServices();
		}
		else
		{
			$this->registerWebServices();
		}
	}
858100
public function register()
    {
        $this->setupConfig();

        $services = config('microservice.services');
        $currentEnv = app()->environment();

        /** @var array $services */
        foreach ($services as $service) {
            if ($service['enabled'] && $this->isInCurrentEnv($currentEnv, $service['environments'])) {
                if (array_get($service, 'config')) {
                    $this->app->configure($service['config']);
                }

                $this->app->register($service['provider']);
            }
        }

        app()->middleware(ConvertEmptyStringsToNull::class);
    }
765655
public function register()
    {
        $this->app['actions']->listen(
            'widgets_init',
            function ()
            {
                foreach ($this->widgets as $widget)
                {
                    if (class_exists($widget))
                    {
                        register_widget($widget);
                    }
                }
            }
        );
    }
843845
public function register()
    {
        //Load helpers
        load_module_helpers(__DIR__);

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

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

        $this->app->register(RouteServiceProvider::class);
        $this->app->register(BootstrapModuleServiceProvider::class);
        $this->app->register(ViewComposerServiceProvider::class);
    }
1124230
public function register()
    {
        $this->bindRouteModel();

        $this->loadAdminAuthConfig();

        $this->registerRouteMiddleware();

        $this->registerPolicies();

        $this->commands($this->commands);
    }
981901
public function register()
	{
		$logger = new Writer(
			new Logger($this->app['env']), $this->app['events']
		);

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

		// If the setup Closure has been bound in the container, we will resolve it
		// and pass in the logger instance. This allows this to defer all of the
		// logger class setup until the last possible second, improving speed.
		if (isset($this->app['log.setup']))
		{
			call_user_func($this->app['log.setup'], $logger);
		}
	}
1101086
public function register()
    {
        // The system resource manager is used to resolve various system resource types.
        // It also implements the resolver interface which may be used by other components adding system resource types.
        $this->app->singleton('df.system.resource', function ($app) {
            return new SystemResourceManager($app);
        });

        $this->app->resolving('df.service', function (ServiceManager $df) {
            // Add the system service
            $df->addType(new ServiceType([
                    'name'              => 'system',
                    'label'             => 'System Management',
                    'description'       => 'Service supporting management of the system.',
                    'group'             => ServiceTypeGroups::SYSTEM,
                    'singleton'         => true,
                    'config_handler'    => Config::class,
                    'factory'           => function ($config) {
                        return new System($config);
                    },
                    'access_exceptions' => [
                        [
                            'verb_mask' => 31, //Allow all verbs
                            'resource'  => 'admin/session',
                        ],
                        [
                            'verb_mask' => 2, //Allow POST only
                            'resource'  => 'admin/password',
                        ],
                        [
                            'verb_mask' => 1,
                            'resource'  => 'environment',
                        ]
                    ],
                ]
            ));
        });
    }
1249297
protected function registerServices()
    {
        $this->app->bindShared('modules', function ($app) {
            $path = $app['config']->get('modules.paths.modules');

            return new Repository($app, $path);
        });
    }
400240
protected function registerServices()
    {
        foreach (self::$diMap as $serviceKey => $serviceClass) {
            if (\is_int($serviceKey)) {
                $this->register(new $serviceClass);
            } else {
                $this[$serviceKey] = function ($c) use ($serviceClass) {
                    return new $serviceClass($c);
                };
            }
        }
    }
577991
public function register()
    {
        $this->app->register(\Webpatser\Countries\CountriesServiceProvider::class);

        $loader = \Illuminate\Foundation\AliasLoader::getInstance();
        $loader->alias('Countries', 'Webpatser\Countries\CountriesFacade');
    }
474954
public function register()
    {
        $commands = array(
            'PackageList',
            'PackageMigrate',
            'PackageMigrateRefresh',
            'PackageMigrateReset',
            'PackageMigrateRollback',
            'PackageMigrateStatus',
            'PackageSeed',
            'PackageOptimize',

            //
            'PackageMake',
            'ConsoleMake',
            'ControllerMake',
            'EventMake',
            'JobMake',
            'ListenerMake',
            'MiddlewareMake',
            'ModelMake',
            'NotificationMake',
            'PolicyMake',
            'ProviderMake',
            'MigrationMake',
            'RequestMake',
            'SeederMake',
        );

        foreach ($commands as $command) {
            $method = 'register' .$command .'Command';

            call_user_func(array($this, $method));
        }
    }
422664
public function register()
    {
        // Register 'defaultprofileimage' instance container to our defaultprofileimage object
        $this->app->singleton('defaultprofileimage', function($app)
        {
            return new DefaultProfileImage;
        });

        // Shortcut so developers don't need to add an Alias in app/config/app.php
        $this->app->booting(function()
        {
            $loader = \Illuminate\Foundation\AliasLoader::getInstance();
            $loader->alias('DefaultProfileImage', 'A6digital\Image\Facades\DefaultProfileImage');
        });
    }
1213158
protected function registerServices()
    {
        foreach (Antvel::bindings() as $key => $value) {
            is_numeric($key)
                ? $this->app->singleton($value)
                : $this->app->singleton($key, $value);
        }
    }
600930
public function register()
    {
        $loader = \Illuminate\Foundation\AliasLoader::getInstance();

        $loader->alias('Features', \App\Facades\Features::class);

        $this->app->singleton('FeatureService', function ($app) {
            return app(\App\Services\FeatureService::class);
        });
    }
544972
public function register()
    {
        $this->app->singleton(ServiceCaller::class, function ($app) {
            return new ServiceCaller($app);
        });

        $this->app->alias(
            ServiceCaller::class,
            AbstractServiceCaller::class
        );
    }
1371397
public function register()
    {
        // Merge our config file with the application's copy of config file, to allow user to
        // just override the configuration that they wanted to make and keep the defaults that are
        // not touched
        $this->mergeConfigFrom(
            __DIR__.'/../../config/pluggables.php', 'pluggables'
        );

        // Register Services
        $this->registerServices();

        // Register Repository
        $this->registerRepository();

        // Register Migrator
        // Once the migrator instance is set, go ahead and register all migration related commands that are
        // used by the artisan commands for easy access
        $this->registerMigrator();

        // Register Console Commands
        $this->registerConsoleCommands();
    }