Esempio n. 1
0
 /**
  * Display a listing of the resource.
  * GET /unidadesmedida
  *
  * @return Response
  */
 public function getIndex()
 {
     $unidades = Unidadmedida::all();
     return View::make('unidadesmedida.index', compact('unidades'));
 }
Esempio n. 2
0
 public function getEdit2($id = NULL)
 {
     if (isset($id)) {
         $producto = Producto::find($id);
         $unidades = Unidadmedida::all()->lists('nombre', 'id');
         $categorias = Categoria::where('id', '>', 1)->lists('nombre', 'id');
         return View::make('productos.edit', compact('producto', 'categorias', 'unidades'));
     } else {
         return Redirect::to('/productos');
     }
 }