Register the application services.

@return void
358876
public function register()
    {
        $this->mergeConfigFrom(
            __DIR__.'/Config/permissions.php', 'permissions'
        );

        $this->app->singleton('permissions.templatehelper', function () {
            return new PermissionsTemplateHelper();
        });

        $this->app->singleton('permissions.adderhelper', function () {
            return new PermissionsAdderHelper();
        });
    }
356157
public function register()
    {
        // merge default config
        $this->mergeConfigFrom(
            __DIR__.'/../../config/config.php',
            'httpauth'
        );

        $this->app->singleton('httpauth', function ($app) {
            return new Httpauth($app['config']->get('httpauth'));
        });
    }
561546
public function register()
    {
        $this->registerConfigurationMapper();
        $this->registerCacheManager();
        $this->registerEntityManager();
        $this->registerClassMetadataFactory();
        $this->registerValidationVerifier();

        $this->commands([
            'Mitch\LaravelDoctrine\Console\GenerateProxiesCommand',
            'Mitch\LaravelDoctrine\Console\SchemaCreateCommand',
            'Mitch\LaravelDoctrine\Console\SchemaUpdateCommand',
            'Mitch\LaravelDoctrine\Console\SchemaDropCommand'
        ]);
    }
857645
public function register()
    {
        $this->app->singleton(Manager::class, function ($app) {
            $config = $app->make('config');

            return new Manager(
                $config,
                new Mailer($app->make('mailer'), $config)
            );
        });
    }
258996
public function register()
    {
        $app = $this->app;

        /*
        |--------------------------------------------------------------------------
        | Register route service provider.
        |--------------------------------------------------------------------------
        */
        $app->register(RouteServiceProvider::class);

        /*
        |--------------------------------------------------------------------------
        | Collection extensions.
        |--------------------------------------------------------------------------
        */
        $app->register(CollectionExtensions::class);

        /*
        |--------------------------------------------------------------------------
        | Init list of modules.
        |--------------------------------------------------------------------------
        */
        Config::set('typicms.modules', []);

        /*
        |--------------------------------------------------------------------------
        | TypiCMS utilities.
        |--------------------------------------------------------------------------
        */
        $this->app->singleton('typicms', function () {
            return new TypiCMS();
        });

        /*
        |--------------------------------------------------------------------------
        | Disk drivers for original images and crops.
        |--------------------------------------------------------------------------
        */
        $this->app->singleton('filesystem.default.driver', function () {
            return $this->app['filesystem.disk']->getDriver();
        });

        /*
        |--------------------------------------------------------------------------
        | Register TypiCMS commands.
        |--------------------------------------------------------------------------
        */
        $this->commands([
            Create::class,
            Database::class,
            Install::class,
            Publish::class,
        ]);

        /*
        |--------------------------------------------------------------------------
        | Register TypiCMS routes.
        |--------------------------------------------------------------------------
        */
        $this->registerModuleRoutes();
    }
1259699
public function register()
    {
        $this->registerAuthenticator();

        $this->registerPasswordService();

        $this->registerThrottleService();

        $this->registerUserResolver();

        $this->registerRequestRebindHandler();
    }
140407
public function register()
    {
        $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'litecms.page');

        $this->app->bind('page', function ($app) {
            return $this->app->make('Litecms\Page\Page');
        });

        $this->app->bind(
            'Litecms\Page\Interfaces\PageRepositoryInterface',
            \Litecms\Page\Repositories\Eloquent\PageRepository::class
        );

        $this->app->register(\Litecms\Page\Providers\AuthServiceProvider::class);
        $this->app->register(\Litecms\Page\Providers\EventServiceProvider::class);
        $this->app->register(\Litecms\Page\Providers\RouteServiceProvider::class);
    }
401358
public function register()
    {
        // Configs
        $this->mergeConfigFrom(__DIR__ . '/../../../config/combine-core.php', 'combine-core');
        $this->mergeConfigFrom(__DIR__ . '/../../../config/fractal.php', 'fractal');
        config(['database.connections.combineTesting' => [
            'driver' => 'sqlite',
            'database' => ':memory:',
            'prefix' => '',
        ]]);

        // Factories
        $this->registerEloquentFactoriesFrom(__DIR__ . '/../../../factories');
    }
765655
public function register()
    {
        $this->app['actions']->listen(
            'widgets_init',
            function ()
            {
                foreach ($this->widgets as $widget)
                {
                    if (class_exists($widget))
                    {
                        register_widget($widget);
                    }
                }
            }
        );
    }
920608
public function register() : void
    {
        if ($this->getConfigParam('env') == 'prod') {
            ini_set('display_errors', 'Off');
        } else {
            ini_set('display_errors', 'On');
        }
        error_reporting(E_ALL);
        set_error_handler([$this, 'handleError']);
        set_exception_handler([$this, 'handleException']);
    }
849393
public function register()
    {
        $this->resolveDirectories();

        $this->tryRequireHelpers(self::ON_REGISTER);
        $this->tryRegisterProviders(self::ON_REGISTER);

        if (method_exists($this, $this->bootingMethod)) {
            $this->app->booting(function (Application $app) {
                $app->call([$this, $this->bootingMethod]);
            });
        }

        if (method_exists($this, $this->bootedMethod)) {
            $this->app->booted(function (Application $app) {
                $app->call([$this, $this->bootedMethod]);
            });
        }

        // Config
        $this->registerConfigFiles();

        // Middlewares
        if (!$this->app->runningInConsole()) {
            $router = $this->app->make('router');
            $kernel = $this->app->make('Illuminate\Contracts\Http\Kernel');

            foreach ($this->prependMiddleware as $middleware) {
                $kernel->prependMiddleware($middleware);
            }

            foreach ($this->middleware as $middleware) {
                $kernel->pushMiddleware($middleware);
            }

            foreach ($this->routeMiddleware as $key => $middleware) {
                $router->middleware($key, $middleware);
            }
        }

        // Container bindings and aliases
        foreach ($this->bindings as $binding => $class) {
            $this->app->bind($binding, $class);
        }

        foreach ($this->weaklings as $binding => $class) {
            $this->bindIf($binding, $class);
        }

        foreach (['share' => $this->share, 'shared' => $this->shared] as $type => $bindings) {
            foreach ($bindings as $binding => $class) {
                $this->share($binding, $class, [], $type === 'shared');
            }
        }

        foreach ($this->singletons as $binding => $class) {
            if ($this->strict && !class_exists($class) && !interface_exists($class)) {
                throw new \Exception(get_called_class().": Could not find alias class [{$class}]. This exception is only thrown when \$strict checking is enabled");
            }
            $this->app->singleton($binding, $class);
        }

        foreach ($this->aliases as $alias => $full) {
            if ($this->strict && !class_exists($full) && !interface_exists($full)) {
                throw new \Exception(get_called_class().": Could not find alias class [{$full}]. This exception is only thrown when \$strict checking is enabled");
            }
            $this->app->alias($alias, $full);
        }

        // Commands
        if ($this->app->runningInConsole()) {
            foreach ($this->findCommands as $path) {
                $dir = path_get_directory((new ReflectionClass(get_called_class()))->getFileName());
                $classes = $this->findCommandsIn(path_join($dir, $path), $this->findCommandsRecursive);

                $this->commands = array_merge($this->commands, $classes);
            }
            if (is_array($this->commands) && count($this->commands) > 0) {
                $commands = [];
                foreach ($this->commands as $k => $v) {
                    if (is_string($k)) {
                        $this->app[ $this->commandPrefix.$k ] = $this->app->share(function ($app) use ($k, $v) {
                            return $app->build($v);
                        });

                        $commands[] = $this->commandPrefix.$k;
                    } else {
                        $commands[] = $v;
                    }
                }
                $this->commands($commands);
            }
        }
        // Facades
        if (class_exists('Illuminate\Foundation\AliasLoader')) {
            \Illuminate\Foundation\AliasLoader::getInstance($this->facades)->register();
        }

        // Helpers
        $this->tryRequireHelpers(self::ON_REGISTERED);

        $this->tryRegisterProviders(self::ON_REGISTERED);

        return $this->app;
    }
967172
public function register()
    {
        $this->app->singleton('command.models.generate', function($app) {
            $db = $app['db.connection'];
            $driverClass = __NAMESPACE__.'\Drivers\\'.ucfirst($db->getDriverName()).'Driver';
            $driver = new $driverClass($db->getPdo());

            $builder = new Builder($app['config'], $driver);

            return new Console\GenerateCommand($builder);
        });

        $this->commands([
            'command.models.generate'
        ]);
    }
1134755
public function register()
    {
        $this->mergeConfigFrom(__DIR__ . '/config.php', 'slack-output');

        $this->app->singleton(Service::class, function () {
            return new Service(config('slack-output'));
        });
    }
300650
public function register()
    {
        $this->commands([
            Commands\SetEnv::class,
            Commands\GetEnv::class,
            Commands\DeleteEnv::class,
            Commands\ListEnv::class,
        ]);
    }
498104
public function register()
    {
        $this->app->singleton(ModelService::class, function ($app) {
            return new ModelService();
        });

        $this->app->singleton(IndexService::class, function ($app) {
            return new IndexService($app->make(ModelService::class));
        });

        $this->app->singleton(ModeContainer::class, function ($app) {
            $engineNamespace = 'Yab\\MySQLScout\\Engines\\Modes\\';
            $mode = $engineNamespace.studly_case(strtolower(config('scout.mysql.mode')));
            $fallbackMode = $engineNamespace.studly_case(strtolower(config('scout.mysql.min_fulltext_search_fallback')));

            return new ModeContainer(new $mode(), new $fallbackMode());
        });
    }
1317868
public function register()
    {
        $this->bind('logger', function ($server) {
            $name = $server->getProcessName();
            $path = $this->config('runtime_path', '') . '/logs/' . $name . '.log';

            return new Logger($name, $path);
        });
    }
349738
public function register()
    {
        $this->registerInstallCommand();
        $this->registerAuthSettingsInstallCommand();
        $this->registerAuthFilesInstallCommand();
        $this->registerAuthModelInstallCommand();
        $this->registerAuthViewsInstallCommand();
        //$this->registerInstallMiddlewareCommand();
    }