app->runningInConsole() && ! $this->app->runningUnitTests()) { return; } $this->setupPaginator(); } private function setupPaginator(): void { // * PAGINATOR if (collect(explode('/', \request()->getPathInfo()))->get(1) === 'bo') { Paginator::defaultView('bo.modules.pagination'); } else { Paginator::defaultView('fo.modules.pagination'); } // * PAGE LIST View::composer('*', function (ContractsView $view) { $view->with('PageList', Page::getCached() ->mapWithKeys(fn ($page) => [ $page->slug->value() => $page, ])); $view->with('EmployeeSyncService', resolve(EmployeeSyncService::class)); }); } }