Beispiel #1
0
 public function createItem($size, $price, $active)
 {
     $price = Product_map::setPrice($price);
     $this->item->price = $price;
     $this->item->size = $size;
     $this->item->active = $active;
     $this->item->active = $active;
     $this->item->save();
 }
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     $product = Product::findOrFail($id);
     $items = Product_map::where('product_id', $id)->get();
     return view('products.variations.create', compact('product', 'items'));
 }