Esempio n. 1
0
 public function edit($id)
 {
     $prices = Price::where('price_type_id', $id)->get();
     $prices = Price::join('products', 'products.id', '=', 'prices.product_id')->where('price_type_id', $id)->select('prices.id', 'prices.cost', 'prices.price_type_id', 'prices.product_id', 'products.notes', 'products.product_key')->get();
     $name = PriceType::where('id', $id)->first();
     $data = ['precios' => $prices, 'nombre' => $name];
     return View::make('precios.edit', $data);
 }