public function show($name) { $categoryName = $name; $categories = Category::Available()->get(); $products = Product::ByCategoryName($name)->get(); return view('store.category', compact('categories', 'products', 'categoryName')); }