isMobile(); }); // * Tablet detection Blade::if('isTablet', function () { return app('agent')->isTablet(); }); // * Desktop detection Blade::if('isDesktop', function () { return app('agent')->isDesktop(); }); $appInfos = Cache::remember('composer', 360, function () { return json_decode(File::get(\app_path('../composer.json'))); }); // Share composer.json infos. if (isset($appInfos->name) and isset($appInfos->version)) { View::share('cpsr_name', $appInfos->name); View::share('cpsr_version', $appInfos->version); } if (!app()->runningInConsole()) { // Shares this data with all views. if (Schema::hasTable('ranges')) { View::share('allRanges', Range::getCached()); } // * 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(); } } } }