$c->id, "is_confirmed" => true, "is_active" => true ])->count() > 0) { $blogCategories->push($c); } } $latestPostsFooter = Post::orderBy("created_at", "desc")->take(10)->get(); $view->with("blogCategories", $blogCategories); $view->with("latestPostsFooter", $latestPostsFooter); }); } }