name) and isset($appInfos->version)) { View::share('cpsr_name', $appInfos->name); View::share('cpsr_version', $appInfos->version); } if (!app()->runningInConsole()) { // * FORCE BOOTSTRAP PAGINATOR (or custom if in front) // Early boot, request wont be filled as expected. if (collect(explode('/', \request()->getPathInfo()))->get(1) === 'bo') { Paginator::defaultView('bo.modules.pagination'); } else { Paginator::useBootstrapFive(); } // * Inject actual view name View::composer('*', function ($view) { $view->with('viewName', $view->getName()); }); // * Inject menuNodeList View::share('menuNodeList', (function () { /** @var \App\Models\GeneralSetting|null */ $mainMenu = app('settings')->where('type', \App\Enums\Settings\SettingsType::mainMenu)->first(); if (!$mainMenu) { throw new \RuntimeException('Missing setting ' . \App\Enums\Settings\SettingsType::mainMenu->label()); } return $mainMenu->value; })()); } //end if } }