コード例 #1
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $tipoproducto = ProductType::all();
     View::share('selected_option', 'Ver Tipo Producto');
     $view = View::make('tipoproducto.list')->with('tipoproducto', $tipoproducto);
     return $view;
 }
コード例 #2
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     //
     $product = Product::find($id);
     $type = ProductType::all();
     $brand = Brand::all();
     return View::make('product.edit')->withProduct($product)->withBrand($brand)->withType($type);
 }
コード例 #3
0
 public function __construct()
 {
     $productType = ProductType::all();
     View::share('tipo_producto', $productType);
 }