예제 #1
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(Request $request)
 {
     $proveedor = new proveedor();
     $proveedor->cod = $request->cod;
     $proveedor->descripcion = (string) $request->descripcion;
     $proveedor->save();
     return Redirect::to('/principal/proveedores/create');
 }
예제 #2
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($cod)
 {
     $articulo = articulo::find($cod);
     $proveedores = proveedor::lists('descripcion', 'cod');
     return view('articulo.articuloEdit')->with("articulo", $articulo)->with("proveedores", $proveedores);
 }