Ejemplo n.º 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();
 }
Ejemplo n.º 2
0
 /**
  * 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'));
 }