Ejemplo n.º 1
0
 public function category($id)
 {
     $categories = $this->category->all();
     $category = $this->category->find($id);
     $products = $this->product->ofCategory($id)->get();
     return view('store.category', compact('categories', 'category', 'products'));
 }
Ejemplo n.º 2
0
 public function category($id)
 {
     $categories = Category::all();
     $category = Category::find($id);
     $products = Product::ofCategory($id)->get();
     return view('store.category', compact('categories', 'category', 'products'));
 }
Ejemplo n.º 3
0
 public function categoryScope($id, Category $cat, Product $prod)
 {
     $categories = $cat->all();
     $category = $cat->find($id);
     $products = $prod->ofCategory($id)->get();
     return view('store.category', compact('categories', 'products', 'category'));
 }
Ejemplo n.º 4
0
 public function productsCategory(Category $category, Product $product, $id)
 {
     $categories = $category->all();
     $category = $category->find($id);
     $prodcutsCateogry = $product->ofCategory($id)->get();
     $tags = $this->tag->all();
     return view('store.productsCategory', compact('categories', 'category', 'prodcutsCateogry', 'tags'));
 }