themes->view('category', 'index'), compact('categories')); } public function show(Category $category) { $category->loadMissing([ 'children' => fn ($query) => $query->active()->ordered(), ]); $listings = $category->activeListings() ->with('category:id,name') ->latest('id') ->paginate(12); return view($this->themes->view('category', 'show'), compact('category', 'listings')); } }