Register dashboard menus, translations, cms settings
328929
protected function onSessionStarted()
    {
        dashboard_menu()->registerItem([
            'id' => 'webed-dashboard',
            'priority' => -999,
            'parent_id' => null,
            'heading' => trans('webed-core::base.admin_menu.dashboard.heading'),
            'title' => trans('webed-core::base.admin_menu.dashboard.title'),
            'font_icon' => 'icon-pie-chart',
            'link' => route('admin::dashboard.index.get'),
            'css_class' => null,
        ]);

        dashboard_menu()->registerItem([
            'id' => 'webed-configuration',
            'priority' => 999,
            'parent_id' => null,
            'heading' => trans('webed-core::base.admin_menu.configuration.heading'),
            'title' => trans('webed-core::base.admin_menu.configuration.title'),
            'font_icon' => 'icon-settings',
            'link' => route('admin::settings.index.get'),
            'css_class' => null,
        ]);

        cms_settings()
            ->addSettingField('site_title', [
                'group' => 'basic',
                'type' => 'text',
                'priority' => 5,
                'label' => trans('webed-core::base.settings.site_title.label'),
                'helper' => trans('webed-core::base.settings.site_title.helper')
            ], function () {
                return [
                    'site_title',
                    get_setting('site_title'),
                    ['class' => 'form-control']
                ];
            })
            ->addSettingField('app_name', [
                'group' => 'basic',
                'type' => 'text',
                'priority' => 6,
                'label' => trans('webed-core::base.settings.app_name.label'),
                'helper' => trans('webed-core::base.settings.app_name.helper')
            ], function () {
                return [
                    'app_name',
                    get_setting('app_name') ?: config('app.name'),
                    ['class' => 'form-control']
                ];
            })
            ->addSettingField('site_logo', [
                'group' => 'basic',
                'type' => 'selectImageBox',
                'priority' => 7,
                'label' => trans('webed-core::base.settings.site_logo.label'),
                'helper' => trans('webed-core::base.settings.site_logo.helper')
            ], function () {
                return [
                    'site_logo',
                    get_setting('site_logo'),
                    null,
                    trans('webed-core::base.form.choose_image'),
                ];
            })
            ->addSettingField('favicon', [
                'group' => 'basic',
                'type' => 'selectImageBox',
                'priority' => 8,
                'label' => trans('webed-core::base.settings.favicon.label'),
                'helper' => trans('webed-core::base.settings.favicon.helper'),
            ], function () {
                return [
                    'favicon',
                    get_setting('favicon'),
                    null,
                    trans('webed-core::base.form.choose_image'),
                ];
            })
            ->addSettingField('construction_mode', [
                'group' => 'advanced',
                'type' => 'customCheckbox',
                'priority' => 5,
                'label' => null,
                'helper' => trans('webed-core::base.settings.construction_mode.helper'),
            ], function () {
                return [
                    [['construction_mode', '1', trans('webed-core::base.settings.construction_mode.label'), get_setting('construction_mode'),]],
                ];
            })
            ->addSettingField('show_admin_bar', [
                'group' => 'advanced',
                'type' => 'customCheckbox',
                'priority' => 5,
                'label' => null,
                'helper' => trans('webed-core::base.settings.show_admin_bar.helper')
            ], function () {
                return [
                    [['show_admin_bar', '1', trans('webed-core::base.settings.show_admin_bar.label'), get_setting('show_admin_bar')]],
                ];
            });

        cms_settings()->addGroup('socials', trans('webed-core::base.setting_group.socials'));

        $socials = [
            'facebook' => [
                'label' => trans('webed-core::base.settings.socials.facebook'),
            ],
            'youtube' => [
                'label' => trans('webed-core::base.settings.socials.youtube'),
            ],
            'twitter' => [
                'label' => trans('webed-core::base.settings.socials.twitter'),
            ],
            'google_plus' => [
                'label' => trans('webed-core::base.settings.socials.google_plus'),
            ],
            'instagram' => [
                'label' => trans('webed-core::base.settings.socials.instagram'),
            ],
            'linkedin' => [
                'label' => trans('webed-core::base.settings.socials.linkedin'),
            ],
            'flickr' => [
                'label' => trans('webed-core::base.settings.socials.flickr'),
            ],
        ];
        foreach ($socials as $key => $row) {
            cms_settings()->addSettingField($key, [
                'group' => 'socials',
                'type' => 'text',
                'priority' => 1,
                'label' => $row['label'],
                'helper' => null
            ], function () use ($key) {
                return [
                    $key,
                    get_setting($key),
                    [
                        'class' => 'form-control',
                        'placeholder' => 'https://',
                        'autocomplete' => 'off'
                    ]
                ];
            });
        }

        cms_settings()
            ->addGroup('smtp', 'SMTP', 4)
            ->addSettingField('smtp_driver', [
                'group' => 'smtp',
                'type' => 'text',
                'priority' => 1,
                'label' => trans('webed-core::base.settings.smtp.smtp_driver.label'),
                'helper' => trans('webed-core::base.settings.smtp.smtp_driver.helper'),
            ], function () {
                return [
                    'smtp_driver',
                    get_setting('smtp_driver', config('mail.driver')),
                    ['class' => 'form-control']
                ];
            })
            ->addSettingField('smtp_host', [
                'group' => 'smtp',
                'type' => 'text',
                'priority' => 1,
                'label' => trans('webed-core::base.settings.smtp.smtp_host.label'),
                'helper' => trans('webed-core::base.settings.smtp.smtp_host.helper'),
            ], function () {
                return [
                    'smtp_host',
                    get_setting('smtp_host', config('mail.host')),
                    ['class' => 'form-control']
                ];
            })
            ->addSettingField('smtp_port', [
                'group' => 'smtp',
                'type' => 'text',
                'priority' => 1,
                'label' => trans('webed-core::base.settings.smtp.smtp_port.label'),
                'helper' => trans('webed-core::base.settings.smtp.smtp_port.helper'),
            ], function () {
                return [
                    'smtp_port',
                    get_setting('smtp_port', config('mail.port')),
                    ['class' => 'form-control']
                ];
            })
            ->addSettingField('smtp_encryption', [
                'group' => 'smtp',
                'type' => 'text',
                'priority' => 1,
                'label' => trans('webed-core::base.settings.smtp.smtp_encryption.label'),
                'helper' => trans('webed-core::base.settings.smtp.smtp_encryption.helper'),
            ], function () {
                return [
                    'smtp_encryption',
                    get_setting('smtp_encryption', config('mail.encryption')),
                    ['class' => 'form-control']
                ];
            })
            ->addSettingField('smtp_from_address', [
                'group' => 'smtp',
                'type' => 'text',
                'priority' => 1,
                'label' => trans('webed-core::base.settings.smtp.smtp_from_address.label'),
                'helper' => trans('webed-core::base.settings.smtp.smtp_from_address.helper'),
            ], function () {
                return [
                    'smtp_from_address',
                    get_setting('smtp_from_address', config('mail.from.address')),
                    ['class' => 'form-control']
                ];
            })
            ->addSettingField('smtp_from_name', [
                'group' => 'smtp',
                'type' => 'text',
                'priority' => 1,
                'label' => trans('webed-core::base.settings.smtp.smtp_from_name.label'),
                'helper' => trans('webed-core::base.settings.smtp.smtp_from_name.helper'),
            ], function () {
                return [
                    'smtp_from_name',
                    get_setting('smtp_from_name', config('mail.from.name')),
                    ['class' => 'form-control']
                ];
            })
            ->addSettingField('smtp_username', [
                'group' => 'smtp',
                'type' => 'text',
                'priority' => 1,
                'label' => trans('webed-core::base.settings.smtp.smtp_username.label'),
                'helper' => trans('webed-core::base.settings.smtp.smtp_username.helper'),
            ], function () {
                return [
                    'smtp_username',
                    get_setting('smtp_username', config('mail.username')),
                    ['class' => 'form-control']
                ];
            })
            ->addSettingField('smtp_password', [
                'group' => 'smtp',
                'type' => 'text',
                'priority' => 1,
                'label' => trans('webed-core::base.settings.smtp.smtp_password.label'),
                'helper' => trans('webed-core::base.settings.smtp.smtp_password.helper'),
            ], function () {
                return [
                    'smtp_password',
                    get_setting('smtp_password', config('mail.password')),
                    ['class' => 'form-control']
                ];
            });

        config([
            /**
             * Mail config
             */
            'mail.driver' => get_setting('smtp_driver', config('mail.driver')),
            'mail.host' => get_setting('smtp_host', config('mail.host')),
            'mail.port' => get_setting('smtp_port', config('mail.port')),
            'mail.from.address' => get_setting('smtp_from_address', config('mail.from.address')),
            'mail.from.name' => get_setting('smtp_from_name', config('mail.from.name')),
            'mail.encryption' => get_setting('smtp_encryption', config('mail.encryption')),
            'mail.username' => get_setting('smtp_username', config('mail.username')),
            'mail.password' => get_setting('smtp_password', config('mail.password')),

            /**
             * App name
             */
            'app.name' => get_setting('app_name') ?: config('app.name', 'WebEd CMS'),
        ]);
    }
1010443
protected function registerBackendSettings()
    {
        Event::listen('system.settings.extendItems', function ($manager) {
            \System\Models\LogSetting::filterSettingItems($manager);
        });

        SettingsManager::instance()->registerCallback(function ($manager) {
            $manager->registerSettingItems('October.System', [
                'updates' => [
                    'label'       => 'system::lang.updates.menu_label',
                    'description' => 'system::lang.updates.menu_description',
                    'category'    => SettingsManager::CATEGORY_SYSTEM,
                    'icon'        => 'icon-cloud-download',
                    'url'         => Backend::url('system/updates'),
                    'permissions' => ['system.manage_updates'],
                    'order'       => 300
                ],
                'administrators' => [
                    'label'       => 'backend::lang.user.menu_label',
                    'description' => 'backend::lang.user.menu_description',
                    'category'    => SettingsManager::CATEGORY_SYSTEM,
                    'icon'        => 'icon-users',
                    'url'         => Backend::url('backend/users'),
                    'permissions' => ['backend.manage_users'],
                    'order'       => 400
                ],
                'mail_templates' => [
                    'label'       => 'system::lang.mail_templates.menu_label',
                    'description' => 'system::lang.mail_templates.menu_description',
                    'category'    => SettingsManager::CATEGORY_MAIL,
                    'icon'        => 'icon-envelope-square',
                    'url'         => Backend::url('system/mailtemplates'),
                    'permissions' => ['system.manage_mail_templates'],
                    'order'       => 610
                ],
                'mail_settings' => [
                    'label'       => 'system::lang.mail.menu_label',
                    'description' => 'system::lang.mail.menu_description',
                    'category'    => SettingsManager::CATEGORY_MAIL,
                    'icon'        => 'icon-envelope',
                    'class'       => 'System\Models\MailSetting',
                    'permissions' => ['system.manage_mail_settings'],
                    'order'       => 620
                ],
                'mail_brand_settings' => [
                    'label'       => 'system::lang.mail_brand.menu_label',
                    'description' => 'system::lang.mail_brand.menu_description',
                    'category'    => SettingsManager::CATEGORY_MAIL,
                    'icon'        => 'icon-paint-brush',
                    'url'         => Backend::url('system/mailbrandsettings'),
                    'permissions' => ['system.manage_mail_templates'],
                    'order'       => 630
                ],
                'event_logs' => [
                    'label'       => 'system::lang.event_log.menu_label',
                    'description' => 'system::lang.event_log.menu_description',
                    'category'    => SettingsManager::CATEGORY_LOGS,
                    'icon'        => 'icon-exclamation-triangle',
                    'url'         => Backend::url('system/eventlogs'),
                    'permissions' => ['system.access_logs'],
                    'order'       => 900,
                    'keywords'    => 'error exception'
                ],
                'request_logs' => [
                    'label'       => 'system::lang.request_log.menu_label',
                    'description' => 'system::lang.request_log.menu_description',
                    'category'    => SettingsManager::CATEGORY_LOGS,
                    'icon'        => 'icon-file-o',
                    'url'         => Backend::url('system/requestlogs'),
                    'permissions' => ['system.access_logs'],
                    'order'       => 910,
                    'keywords'    => '404 error'
                ],
                'log_settings' => [
                    'label'       => 'system::lang.log.menu_label',
                    'description' => 'system::lang.log.menu_description',
                    'category'    => SettingsManager::CATEGORY_LOGS,
                    'icon'        => 'icon-dot-circle-o',
                    'class'       => 'System\Models\LogSetting',
                    'permissions' => ['system.manage_logs'],
                    'order'       => 990
                ],
            ]);
        });
    }
1016189
private function registerConsoleCommands()
    {
        $this->registerMakeCommand();
        $this->registerEnableCommand();
        $this->registerDisableCommand();
        $this->registerListCommand();
        $this->registerMigrateCommand();
        $this->registerMigrateRefreshCommand();
        $this->registerMakeMigrationCommand();
        $this->registerMakeRequestCommand();
        $this->registerMakeModelCommand();

        $this->commands([
            'pluggables.makeMigration',
            'pluggables.enable',
            'pluggables.disable',
            'pluggables.list',
            'pluggables.make',
            'pluggables.make.request',
            'pluggables.make.model',
            'pluggables.migrate',
            'pluggables.migrateRefresh',
        ]);
    }
1049465
protected function registerResources()
    {
        $basDirectory = $this->getLanguageDirectory();
        $languages = $this->getContainer()->get('translation.languages');

        /** @var Translator $translator */
        $translator = $this->getContainer()->get('translator');

        foreach ($languages as $language) {
            $translator->addResource('php', $basDirectory . DIRECTORY_SEPARATOR . $language, $language);
        }
    }
36338
public function register()
    {
        // Merge configuration file
        $this->mergeConfigFrom(
            __DIR__.'/config/panel.php', 'panel'
        );

        // Pass links to the sidebar
        View::composer('panel::layout', function ($view) {
            View::share('list', Entity::entityList());
        });
    }
969704
public function admin_menu(){
		$title = __('Google Analytics設定', 'gapiwp');
		$menu  = __('Analytics設定', 'gapiwp');
		add_options_page($title, $menu, 'manage_options', 'gapiwp-analytics', array($this, 'admin_render'));
	}
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
        );
    }
1091213
protected function registerBaseServices(): void
    {
        $this->services['acl'] = $this->app->make('orchestra.acl')->make('orchestra');
        $this->app->instance('orchestra.platform.acl', $this->services['acl']);

        $this->services['menu'] = $this->widget('menu');
        $this->app->instance('orchestra.platform.menu', $this->services['menu']);
    }
755400
public function compose()
    {
        $this->dashboard->menu
            ->add(Menu::SYSTEMS,
                ItemMenu::label(__('Content management'))
                    ->slug('CMS')
                    ->icon('icon-layers')
                    ->permission('platform.systems')
                    ->sort(1000)
            )
            ->add('CMS',
                ItemMenu::label(__('Menu'))
                    ->icon('icon-menu')
                    ->route('platform.systems.menu.index')
                    ->permission('platform.systems.menu')
                    ->show(count(config('press.menu', [])) > 0)
                    ->title(__('Editing of a custom menu (navigation) using drag & drop and localization support.'))
            );
    }
1310620
protected function registerBackendNavigation()
    {
        BackendMenu::registerCallback(function ($manager) {
            $manager->registerMenuItems('October.Backend', [
                'dashboard' => [
                    'label'       => 'backend::lang.dashboard.menu_label',
                    'icon'        => 'icon-dashboard',
                    'iconSvg'     => 'modules/backend/assets/images/dashboard-icon.svg',
                    'url'         => Backend::url('backend'),
                    'permissions' => ['backend.access_dashboard'],
                    'order'       => 10
                ],
                'media' => [
                    'label'       => 'backend::lang.media.menu_label',
                    'icon'        => 'icon-folder',
                    'iconSvg'     => 'modules/backend/assets/images/media-icon.svg',
                    'url'         => Backend::url('backend/media'),
                    'permissions' => ['media.*'],
                    'order'       => 200
                ]
            ]);
        });
    }
57598
private function registerRoutes()
    {
        $config = $this->app->make('community_translation/config');
        $onlineTranslationPath = $config->get('options.onlineTranslationPath');
        $apiEntryPoint = $config->get('options.api.entryPoint');
        $handleRegex = '[A-Za-z0-9]([A-Za-z0-9\_]*[A-Za-z0-9])?';
        $localeRegex = '[a-zA-Z]{2,3}([_\-][a-zA-Z0-9]{2,3})?';
        $this->app->make(Router::class)->registerMultiple([
            // Online Translation
            "$onlineTranslationPath/{packageVersionID}/{localeID}" => [
                'Concrete\Package\CommunityTranslation\Controller\Frontend\OnlineTranslation::view',
                null,
                ['packageVersionID' => 'unreviewed|[1-9][0-9]*', 'localeID' => $localeRegex],
                [],
                '',
                [],
                ['GET'],
            ],
            "$onlineTranslationPath/action/save_comment/{localeID}" => [
                'Concrete\Package\CommunityTranslation\Controller\Frontend\OnlineTranslation::save_comment',
                null,
                ['localeID' => $localeRegex],
                [],
                '',
                [],
                ['POST'],
            ],
            "$onlineTranslationPath/action/delete_comment/{localeID}" => [
                'Concrete\Package\CommunityTranslation\Controller\Frontend\OnlineTranslation::delete_comment',
                null,
                ['localeID' => $localeRegex],
                [],
                '',
                [],
                ['POST'],
            ],
            "$onlineTranslationPath/action/load_all_places/{localeID}" => [
                'Concrete\Package\CommunityTranslation\Controller\Frontend\OnlineTranslation::load_all_places',
                null,
                ['localeID' => $localeRegex],
                [],
                '',
                [],
                ['POST'],
            ],
            "$onlineTranslationPath/action/process_translation/{localeID}" => [
                'Concrete\Package\CommunityTranslation\Controller\Frontend\OnlineTranslation::process_translation',
                null,
                ['localeID' => $localeRegex],
                [],
                '',
                [],
                ['POST'],
            ],
            "$onlineTranslationPath/action/load_translation/{localeID}" => [
                'Concrete\Package\CommunityTranslation\Controller\Frontend\OnlineTranslation::load_translation',
                null,
                ['localeID' => $localeRegex],
                [],
                '',
                [],
                ['POST'],
            ],
            "$onlineTranslationPath/action/save_glossary_term/{localeID}" => [
                'Concrete\Package\CommunityTranslation\Controller\Frontend\OnlineTranslation::save_glossary_term',
                null,
                ['localeID' => $localeRegex],
                [],
                '',
                [],
                ['POST'],
            ],
            "$onlineTranslationPath/action/delete_glossary_term/{localeID}" => [
                'Concrete\Package\CommunityTranslation\Controller\Frontend\OnlineTranslation::delete_glossary_term',
                null,
                ['localeID' => $localeRegex],
                [],
                '',
                [],
                ['POST'],
            ],
            "$onlineTranslationPath/action/download/{localeID}" => [
                'Concrete\Package\CommunityTranslation\Controller\Frontend\OnlineTranslation::download',
                null,
                ['localeID' => $localeRegex],
                [],
                '',
                [],
                ['POST'],
            ],
            "$onlineTranslationPath/action/upload/{localeID}" => [
                'Concrete\Package\CommunityTranslation\Controller\Frontend\OnlineTranslation::upload',
                null,
                ['localeID' => $localeRegex],
                [],
                '',
                [],
                ['POST'],
            ],
            "$onlineTranslationPath/action/save_notifications/{packageID}" => [
                'Concrete\Package\CommunityTranslation\Controller\Frontend\OnlineTranslation::save_notifications',
                null,
                ['packageID' => '\d+'],
                [],
                '',
                [],
                ['POST'],
            ],
            // API Entry Points
            "$apiEntryPoint/rate-limit/" => [
                'CommunityTranslation\Api\EntryPoint::getRateLimit',
                null,
                [],
                [],
                '',
                [],
                ['GET'],
            ],
            "$apiEntryPoint/locales/" => [
                'CommunityTranslation\Api\EntryPoint::getLocales',
                null,
                [],
                [],
                '',
                [],
                ['GET'],
            ],
            "$apiEntryPoint/packages/" => [
                'CommunityTranslation\Api\EntryPoint::getPackages',
                null,
                [],
                [],
                '',
                [],
                ['GET'],
            ],
            "$apiEntryPoint/package/{packageHandle}/versions/" => [
                'CommunityTranslation\Api\EntryPoint::getPackageVersions',
                null,
                ['packageHandle' => $handleRegex],
                [],
                '',
                [],
                ['GET'],
            ],
            "$apiEntryPoint/package/{packageHandle}/{packageVersion}/locales/{minimumLevel}/" => [
                'CommunityTranslation\Api\EntryPoint::getPackageVersionLocales',
                null,
                ['packageHandle' => $handleRegex, 'minimumLevel' => '[0-9]{1,3}'],
                [],
                '',
                [],
                ['GET'],
            ],
            "$apiEntryPoint/package/{packageHandle}/{packageVersion}/translations/{localeID}/{formatHandle}/" => [
                'CommunityTranslation\Api\EntryPoint::getPackageVersionTranslations',
                null,
                ['packageHandle' => $handleRegex, 'localeID' => $localeRegex, 'formatHandle' => $handleRegex],
                [],
                '',
                [],
                ['GET'],
            ],
            "$apiEntryPoint/fill-translations/{formatHandle}/" => [
                'CommunityTranslation\Api\EntryPoint::fillTranslations',
                null,
                ['formatHandle' => $handleRegex],
                [],
                '',
                [],
                ['POST'],
            ],
            "$apiEntryPoint/package/{packageHandle}/{packageVersion}/translatables/{formatHandle}/" => [
                'CommunityTranslation\Api\EntryPoint::importPackageVersionTranslatables',
                null,
                ['packageHandle' => $handleRegex, 'formatHandle' => $handleRegex],
                [],
                '',
                [],
                ['POST'],
            ],
            "$apiEntryPoint/translations/{localeID}/{formatHandle}/{approve}/" => [
                'CommunityTranslation\Api\EntryPoint::importTranslations',
                null,
                ['localeID' => $localeRegex, 'formatHandle' => $handleRegex, 'approve' => '[01]'],
                [],
                '',
                [],
                ['POST'],
            ],
            "$apiEntryPoint/import/package/" => [
                'CommunityTranslation\Api\EntryPoint::importPackage',
                null,
                [],
                [],
                '',
                [],
                ['PUT'],
            ],
            "$apiEntryPoint/{unrecognizedPath}" => [
                'CommunityTranslation\Api\EntryPoint::unrecognizedCall',
                null,
                ['unrecognizedPath' => '.*'],
            ],
            "$apiEntryPoint" => [
                'CommunityTranslation\Api\EntryPoint::unrecognizedCall',
            ],
        ]);
    }
695659
public static function registerColumnDisplayer()
    {
        $map = [
            'editable'    => \Ekipisi\Admin\Grid\Displayers\Editable::class,
            'switch'      => \Ekipisi\Admin\Grid\Displayers\SwitchDisplay::class,
            'switchGroup' => \Ekipisi\Admin\Grid\Displayers\SwitchGroup::class,
            'select'      => \Ekipisi\Admin\Grid\Displayers\Select::class,
            'image'       => \Ekipisi\Admin\Grid\Displayers\Image::class,
            'label'       => \Ekipisi\Admin\Grid\Displayers\Label::class,
            'button'      => \Ekipisi\Admin\Grid\Displayers\Button::class,
            'link'        => \Ekipisi\Admin\Grid\Displayers\Link::class,
            'badge'       => \Ekipisi\Admin\Grid\Displayers\Badge::class,
            'progressBar' => \Ekipisi\Admin\Grid\Displayers\ProgressBar::class,
            'radio'       => \Ekipisi\Admin\Grid\Displayers\Radio::class,
            'checkbox'    => \Ekipisi\Admin\Grid\Displayers\Checkbox::class,
            'orderable'   => \Ekipisi\Admin\Grid\Displayers\Orderable::class,
        ];

        foreach ($map as $abstract => $class) {
            Column::extend($abstract, $class);
        }
    }
1175519
public function registerAll()
    {
        /** @var LanguageService $service */
        $service   = resolve(LanguageService::class);
        $languages = $service->getAllEnabled();
        foreach ($this->routes['ml'] as $value) {
            foreach ($languages as $language) {
                $prefix = null;
                if (!$language->is_default) {
                    $prefix = $language->code;
                }
                Route::group(
                    array_merge(['prefix' => $prefix], $value['groupArgs']),
                    function ($router) use ($value, $language) {
                        $value['closure']($router, $language->code);
                    }
                );
            }
        }
        foreach ($this->routes['regular'] as $value) {
            Route::group(
                $value['groupArgs'],
                function ($router) use ($value) {
                    $value['closure']($router);
                }
            );
        }
        if (!empty($this->routes['catchAll'])) {
            Route::group(
                $this->routes['catchAll']['groupArgs'],
                function ($router) {
                    $this->routes['catchAll']['closure']($router);
                }
            );
        }

        $router = resolve('router');
        $router->getRoutes()->refreshActionLookups();
        $router->getRoutes()->refreshNameLookups();
    }
673329
public function register(){
        //register commands
        $this->commands([
            Commands\CrudCommand::class,
            Commands\ControllerCommand::class,
            Commands\ServiceCommand::class,
            Commands\ContractCommand::class,
            Commands\ViewCommand::class,
        ]);
        //Merge config
        $this->mergeConfigFrom(
            __DIR__.'/../config/crudable.php', 'crudable'
        );
        //Load config
        $config = $this->app->make('config');
        //Check for auto binding
        if($config->get('crudable.use_auto_binding')){
            //Run contextual binding first
            foreach($config->get('crudable.implementations') as $usage){
                $this->app->when($usage['when'])
                    ->needs(isset($usage['needs'])?$usage['needs']:\Flobbos\Crudable\Contracts\Crud::class)
                    ->give($usage['give']);
            }
            //Run fixed bindings
            foreach($config->get('crudable.bindings') as $binding){
                $this->app->bind($binding['contract'],$binding['target']);
            }
        }
    }
351026
private function registerMenuComponent()
    {
        $this->app->register(\Konekt\Menu\MenuServiceProvider::class);
        $this->concord->registerAlias('Menu', \Konekt\Menu\Facades\Menu::class);
    }
908040
public function register()
    {
        // Bind the Laravel JS Localization command into the app IOC.
        $this->app->singleton('localization.js', function ($app) {
            $app = $this->app;
            $laravelMajorVersion = (int) $app::VERSION;
            
            $files = $app['files'];
            
            if ($laravelMajorVersion === 4) {
                $langs = $app['path.base'].'/app/lang';
            } elseif ($laravelMajorVersion === 5) {
                $langs = $app['path.base'].'/resources/lang';
            }
            $messages = $app['config']->get('localization-js.messages');
            $generator = new Generators\LangJsGenerator($files, $langs, $messages);

            return new Commands\LangJsCommand($generator);
        });

        // Bind the Laravel JS Localization command into Laravel Artisan.
        $this->commands('localization.js');
    }
1365645
protected function registerFacadeBindings()
    {
        $this->app->bind('cms-models-modelinfo', RepositoriesContracts\CurrentModelInformationInterface::class);
        $this->app->bind('cms-translation-locale-helper', TranslationLocaleHelperInterface::class);

        return $this;
    }