/** * Display a listing of the resource. * GET /unidadesmedida * * @return Response */ public function getIndex() { $unidades = Unidadmedida::all(); return View::make('unidadesmedida.index', compact('unidades')); }
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'); } }