limit(3)->inRandomOrder()->get(); /** @var \App\Models\News $newsModels */ $newsModels = News::query()->where('published', true)->orderBy('created_at', 'desc')->limit(6)->get(); /** @var \App\Models\StaticPage $staticPageModel */ $staticPageModel = StaticPage::query()->where('type', StaticPageType::home)->firstOrFail(); /** @var \App\Models\KlubBloc|null $klubBloc */ $klubBloc = KlubBloc::query()->first(); \throw_if(is_null($klubBloc), 'empty klubBloc'); return view('fo.pages.home', compact('staticPageModel', 'rangeModels', 'klubBloc', 'newsModels')); } }