Register the service provider.

@return object
763878
public function register()
    {
        $cache = 'redisCache';

        if ($cache == 'redisCache') {
            $this->app->singleton($cache, function () {
                if (!extension_loaded('redis')) {
                    return null;
                }
                return new RedisCacheService($this->app->singleton('redis'));
            });
        }
    }
688206
public function register()
    {
        $this->app->singleton( Countries::class, function (Container $app) {
            return new Countries();
        });

        $this->app->singleton( Validator::class, function (Container $app) {
           return new Validator();
        });

        $this->app->singleton( Rates::class, function (Container $app) {
            $defaultCacheDriver = $app['cache']->getDefaultDriver();
            $cacheDriver = $app['cache']->driver( $defaultCacheDriver );
            return new Rates( null, $cacheDriver );
        });
    }
1220009
public function register()
    {
        $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'task');

        // Bind facade
        $this->app->bind('task', function ($app) {
            return $this->app->make('Litepie\Task\Task');
        });

        // Bind Task to repository
        $this->app->bind(
            'Litepie\Task\Interfaces\TaskRepositoryInterface',
            \Litepie\Task\Repositories\Eloquent\TaskRepository::class
        );

        $this->app->register(\Litepie\Task\Providers\AuthServiceProvider::class);
        $this->app->register(\Litepie\Task\Providers\EventServiceProvider::class);
        $this->app->register(\Litepie\Task\Providers\RouteServiceProvider::class);
    }
694201
public function register()
    {
        $config = __DIR__ . '/config/config.php';
        $this->mergeConfigFrom($config, 'salesforce');
        $this->publishes([$config => config_path('salesforce.php')]);

        $this->app->singleton('salesforce', function ($app) {
            $sf = new Salesforce(new Client());
            $sf->connect($app['config']);

            return $sf;
        });
    }
833426
public function register()
    {
        $this->app->singleton('validator/password', function () {
            $this->config = $this->app->make('config');
            $manager = $this->app->make(ValidatorForSubjectManager::class);

            $this->applyLengthValidators($manager);
            $this->applyStringRequirementValidators($manager);
            $this->applyRegexRequirements($manager);
            $this->applyPasswordReuseValidator($manager);

            return $manager;
        });
    }
276269
public function register()
    {
        foreach ($this->singletonClassMap as $abstract => $concrete)
        {
            $this->app->singleton($abstract, function() use ($concrete)
            {
                return $this->app->make($concrete);
            });
        }
    }
621618
public function register()
    {
        $this->registerRevisionRepository();
        $this->registerUserRepository();
        $this->registerGroupRepository();
        $this->registerCredentials();

        $this->registerLoginController();
        $this->registerRegistrationController();
        $this->registerResetController();
        $this->registerActivationController();
    }
102498
public function register()
    {
        $this->app->bindShared('command.cache.clear', function ($app)
        {
            return new Console\ClearCommand($app['cache'], $app['files']);
        });

        $this->app->bindShared('command.cache.forget', function ($app)
        {
            return new Console\ForgetCommand($app['cache']);
        });

        $this->app->bindShared('command.cache.table', function ($app)
        {
            return new Console\CacheTableCommand($app['files']);
        });

        $this->commands('command.cache.clear', 'command.cache.forget', 'command.cache.table');
    }
1064936
public function register()
    {
        $this->app->singleton('salesforce', function ($app) {
            $sf = new Salesforce(new Client());
            $sf->connect($app['config']);

            return $sf;
        });
    }
1033820
public function register()
	{
		$this->app->singleton('Congraph\Core\Repositories\ObjectResolver', function ($app) {
			return new ObjectResolver($app['Illuminate\Contracts\Container\Container']);
		});

		$this->app->alias(
			'Congraph\Core\Repositories\ObjectResolver', 'Congraph\Contracts\Core\ObjectResolverContract'
		);

		$this->app->singleton('Congraph\Core\Repositories\TrunkCache', function ($app) {
			return new TrunkCache();
		});

		$this->app->alias(
			'Congraph\Core\Repositories\TrunkCache', 'Congraph\Contracts\Core\TrunkContract'
		);
	}
58710
public function register()
    {
        $this->mergeConfigFrom($this->configPath(), 'cors');

        $this->app->singleton(CORSHelper::class, function($app){
            return new CORSHelper($app['config']->get('cors'));
        });
    }
556615
public function register()
    {
        $this->app->singleton('fractal', function ($app, $arguments) {
            return fractal(...$arguments);
        });

        $this->app->alias('fractal', Fractal::class);
    }
829044
public function register()
    {
        $this->app->singleton('log', function () {
            return $this->createLogger();
        });

        $this->app->alias('log', Log::class);
        $this->app->alias('log', LoggerInterface::class);
        $this->app->alias('log', Writer::class);
    }
1076114
public function register()
    {
        $this->mergeConfigFrom(
            __DIR__.'/../config/hstcms.php', 'hstcms'
        );
        $this->app->register(RouteServiceProvider::class);
        $this->app->register(HelperServiceProvider::class);
        $this->app->register(ConsoleServiceProvider::class);
        $this->app->register(LibrariesServiceProvider::class);
        $this->app->register(RepositoryServiceProvider::class);
        $this->app->register(MiddlewareServiceProvider::class);
        $this->app->register(GeneratorServiceProvider::class);

        $this->app->singleton('hstcms', function ($app) {
            $repository = $app->make(Repository::class);
            return new Hstcms($app, $repository);
        });
    }
512781
public function register()
    {
        $this->mergeConfigFrom(__DIR__ . '/config/laravel-random.php', 'laravel-random');
        
        $this->app->singleton('random', function ($app) {
            $factory = new \RandomLib\Factory;
            
            $strength = $app['config']->get('laravel-random.strength');
            
            if ($strength === 'high') {
                return $factory->getHighStrengthGenerator();
            }
            
            if ($strength === 'medium') {
                return $factory->getMediumStrengthGenerator();
            }
            
            return $factory->getLowStrengthGenerator();
        });
    }
171798
public function register()
    {
        $this->app->singleton('currency', function ($app) {

            return new Currency(new CookieProvider(
                new Config($app->make('config')->get('currency')),
                $app->make('request')
            ));

        });
    }
502720
public function register()
    {
        if (!$this->app->bound(TranslatorAdapterFactoryInterface::class)) {
            $this->app->bind(TranslatorAdapterFactoryInterface::class, function ($app, $params) {
                $config = $app->make('config');
                $loaders = $config->get('i18n.adapters.zend.loaders', []);

                $loaderRepository = new TranslationLoaderRepository();
                foreach ($loaders as $key => $class) {
                    $loader = $app->build($class, [$app]);
                    $loaderRepository->registerTranslationLoader($key, $loader);
                }

                $serviceManager = new ServiceManager();
                $loaderPluginManager = new LoaderPluginManager(
                    $serviceManager,
                    [
                        'factories' => [
                            GettextLoader::class => function($creationContext, $resolvedName, $options) {
                                return $this->app->build(GettextLoader::class, ['webrootDirectory' => DIR_BASE]);
                            }
                        ],
                        'aliases' => [
                            'gettext' => GettextLoader::class,
                        ],
                    ]
                );
                $zendFactory = new ZendTranslatorAdapterFactory($loaderRepository, $loaderPluginManager);
                $plainFactory = new PlainTranslatorAdapterFactory();

                return new CoreTranslatorAdapterFactory($config, $plainFactory, $zendFactory);
            });
        }

        $this->app->singleton(Localization::class, function ($app) {
            $loc = new Localization();

            $translatorAdapterFactory = $app->make(TranslatorAdapterFactoryInterface::class);
            $repository = new TranslatorAdapterRepository($translatorAdapterFactory);
            $loc->setTranslatorAdapterRepository($repository);

            $loc->setActiveContext(Localization::CONTEXT_UI);

            return $loc;
        });
    }