Exemplo n.º 1
0
 public function tag(Category $cat, Tag $t, $id)
 {
     $categories = $cat->all();
     $tag = $t->find($id);
     $products = $tag->products;
     return view('store.tag', compact('categories', 'tag', 'products'));
 }
Exemplo n.º 2
0
 /**
  *
  *
  * @param \PortalComercial\Tag $productTag
  * @param $id
  * @return \Illuminate\Http\RedirectResponse
  */
 public function tagDelete(\PortalComercial\Tag $productTag, $id)
 {
     $tag = $productTag->find($id);
     $tag->delete();
     return redirect()->route('products.tags');
 }