app/Http/Controllers/materia_primaController.php
/**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
Store a newly created resource in storage.
Store a newly created resource in storage .
public function store(Request $request)
    {
        $materia_prima= new materia_prima();
        $materia_prima->id=$request->id;
        $materia_prima->nombre=$request->nombre;
        $materia_prima->cantidad=$request->cantidad;
        $materia_prima->costo=$request->costo;
        $materia_prima->unidadmedida=$request->unidadmedida;
        $materia_prima->save();
        return redirect()->route('materia_prima.index');
    }
public function store ( Request $ request ) { $ materia_prima = new materia_prima ( ) ; $ materia_prima -> id = $ request -> id ; $ materia_prima -> nombre = $ request -> nombre ; $ materia_prima -> cantidad = $ request -> cantidad ; $ materia_prima -> costo = $ request -> costo ; $ materia_prima -> unidadmedida = $ request -> unidadmedida ; $ materia_prima -> save ( ) ; return redirect ( ) -> route ( 'materia_prima.index' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .
//