public function category($id) { $product = new Product(); $products = $product->productCategory($id); $category = new Category(); $categories = $category->getCategory($id); $tags = new Tag(); $image = new Image(); view('front.category', compact('products', 'image', 'tags', 'categories')); }