Register the URL generator service.

@return void
545057
protected function registerUrlGenerator()
	{
		$this->app['url'] = $this->app->share(function($app)
		{
			// The URL generator needs the route collection that exists on the router.
			// Keep in mind this is an object, so we're passing by references here
			// and all the registered routes will be available to the generator.
			$routes = $app['router']->getRoutes();

			return new UrlGenerator($routes, $app->rebinding('request', function($app, $request)
			{
				$app['url']->setRequest($request);
			}));
		});
	}
823700
protected function registerModelGenerator()
	{
		$this->app['generate.model'] = $this->app->share(function($app)
		{
			$cache = new Cache($app['files']);
			$generator = new Generators\ModelGenerator($app['files'], $cache);

			return new Commands\ModelGeneratorCommand($generator);
		});
	}
201766
protected function registerSeeder()
    {
        $this->app['generate.seeder'] = $this->app->share(function($app)
        {
            $generator = $this->app->make('Way\Generators\Generator');

            return new SeederGeneratorCommand($generator);
        });

        $this->commands('generate.seeder');
    }
399577
public function register()
    {
        // Register Crumbs
        $this->app->bind('crumbs', function (Application $app) {
            return $app->make(Crumbs::class);
        });

        // Register an Alias
        $this->app->booting(function () {
            $loader = AliasLoader::getInstance();
            $loader->alias('Crumbs', CrumbsFacade::class);
        });
    }
890754
protected function registerViewGenerator()
	{
		$this->app['generate.view'] = $this->app->share(function($app)
		{
			$cache = new Cache($app['files']);
			$generator = new Generators\ViewGenerator($app['files'], $cache);

			return new Commands\ViewGeneratorCommand($generator);
		});
	}
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();
        });
    }
1275717
public function registering()
    {
        require_once 'helpers/helpers.php';

        $this->app->singleton(self::PROVIDES_STRING_COMPILER, function (Application $app) {
            return new StringCompiler($app->make('files'), storage_path('views'));
        });

        $this->app->singleton(self::PROVIDES_SERVICE, function (Application $app) {

            $compiler = new BladedCompiler(
                $app->make('blade.compiler'),
                $app,
                'Bladed::getCommand',
                self::PROVIDES_SERVICE
            );

            return new BladedManager($compiler, $app, $app->make(self::PROVIDES_STRING_COMPILER));
        });

        $this->app->singleton(IBladedManager::class, function (Application $app) {
            return $app->make(self::PROVIDES_SERVICE);
        });
    }
794708
public function register()
    {
        $this->app['localization.js-generator'] = $this->app->share(function ($app) {
            $files = $app['files'];

            return new Generators\LangJsGenerator($files);
        });
        $this->app['localization.js'] = $this->app->share(function ($app) {
            return new Commands\LangJsCommand($app['localization.js-generator']);
        });
        $this->commands('localization.js');
    }
152392
public static function registerRoutes()
    {
        /* @var \Illuminate\Routing\Router $router */
        Route::group(['prefix' => config('admin.route.prefix')], function ($router) {
            $attributes = array_merge([
                'middleware' => config('admin.route.middleware'),
            ], static::config('route', []));

            Route::group($attributes, function ($router) {

                /* @var \Illuminate\Routing\Router $router */
                $router->resource('messages', 'Encore\Admin\Message\MessageController');
            });
        });
    }
295252
public function register()
    {
        // Register the Generator service provider
        if ($this->app->environment() == 'local') {
            $this->app->register('Laracasts\Generators\GeneratorsServiceProvider');
        }

        // Register our commands
        $this->app->singleton('command.josh.generate', function ($app) {
            return $app['JoshTaylor\MigrationsGenerator\GenerateCommand'];
        });

        $this->commands('command.josh.generate');
    }
199737
public function register()
    {
        $this->mergeConfigFrom(__DIR__ . '/../../../config/settings.php', 'settings');

        $this->app->singleton('settings.key_generator', function ($app) {
            return $app->make($app['config']['settings.key_generator']);
        });

        $this->app->singleton('settings.context_serializer', function ($app) {
            return $app->make($app['config']['settings.context_serializer']);
        });

        $this->app->singleton('settings.value_serializer', function ($app) {
            return $app->make($app['config']['settings.value_serializer']);
        });

        $this->app->singleton('settings.factory', function ($app) {
            return new Factory($app);
        });

        $this->app->singleton('settings.repository', function ($app) {
            return $app['settings.factory']->driver();
        });

        $this->app->singleton('settings', function ($app) {
            $settings = new Settings(
                $app['settings.repository'],
                $app['settings.key_generator'],
                $app['settings.value_serializer']
            );

            $settings->setCache($app['cache.store']);
            $settings->setEncrypter($app['encrypter']);
            $settings->setDispatcher($app['events']);

            $app['config']['settings.cache'] ? $settings->enableCache() : $settings->disableCache();
            $app['config']['settings.encryption'] ? $settings->enableEncryption() : $settings->disableEncryption();
            $app['config']['settings.events'] ? $settings->enableEvents() : $settings->disableEvents();

            return $settings;
        });

        $this->registerAliases();

        $this->registerCommands();
    }
778759
protected function registerModel()
    {
        $this->app['generate.model'] = $this->app->share(function($app)
        {
            $generator = $this->app->make('Way\Generators\Generator');

            return new ModelGeneratorCommand($generator);
        });

        $this->commands('generate.model');
    }
483774
protected function registerMigrationGenerator()
	{
		$this->app['generate.migration'] = $this->app->share(function($app)
		{
			$cache = new Cache($app['files']);
			$generator = new Generators\MigrationGenerator($app['files'], $cache);

			return new Commands\MigrationGeneratorCommand($generator);
		});
	}
965829
public function register()
    {
        $this->app->singleton(self::ROUTE_RESOLVER_VAR_NAME, function ($app) {
            $resolver = new RouteResolver();

            \View::share(self::ROUTE_RESOLVER_VAR_NAME, $resolver);
            return $resolver;
        });

        if ($this->app->runningInConsole()) {
            $this->publishes([
                __DIR__.'/config/route-resolver.php' => config_path('crumby-crumbs/route-resolver.php')
            ], 'config');
        }
        
        $this->app->alias(self::ROUTE_RESOLVER_VAR_NAME, 'Crumby\RouteResolver\RouteResolver');
        \RouteResolver::loadConfig();
    }
529616
public function registerResourceAliases() {

		$factory = Yii::$app->factory->getContainer();

		$factory->set( 'formService', 'cmsgears\cms\common\services\resources\FormService' );
		$factory->set( 'categoryService', 'cmsgears\cms\common\services\resources\CategoryService' );
		$factory->set( 'tagService', 'cmsgears\cms\common\services\resources\TagService' );

		$factory->set( 'pageMetaService', 'cmsgears\cms\common\services\resources\PageMetaService' );
		$factory->set( 'modelContentService', 'cmsgears\cms\common\services\resources\ModelContentService' );

		$factory->set( 'linkService', 'cmsgears\cms\common\services\resources\LinkService' );
	}
276245
public function register()
    {
        $this->registerConfig();

        $this->registerClassAliases();

        $this->app->register(RoutingServiceProvider::class);

        $this->app->register(HttpServiceProvider::class);

        $this->registerExceptionHandler();

        $this->registerDispatcher();

        $this->registerAuth();

        $this->registerTransformer();

        $this->registerDocsCommand();

        if (class_exists('Illuminate\Foundation\Application', false)) {
            $this->commands([
                \Dingo\Api\Console\Command\Cache::class,
                \Dingo\Api\Console\Command\Routes::class,
            ]);
        }
    }
106150
public function registerUrlGeneratorFactory()
    {
        $this->app->singleton('mediable.url.factory', function (Container $app) {
            $factory = new UrlGeneratorFactory;

            $config = $app['config']->get('mediable.url_generators');
            foreach ($config as $driver => $generator) {
                $factory->setGeneratorForFilesystemDriver($generator, $driver);
            }

            return $factory;
        });
        $this->app->alias('mediable.url.factory', UrlGeneratorFactory::class);
    }