app/Http/Controllers/ProductoController.php
/**
     * Store a newly created resource in storage.
     *
     * @param  \App\Http\Requests\StoreProductoRequest  $request
     * @return \Illuminate\Http\Response
     */
Store a newly created resource in storage.
Store a newly created resource in storage .
public function store(StoreProductoRequest $request)
    {
        $request->validate([
            'descripcion' => 'requered',
            'precio' => 'required'
        ]);
        Productos::create($request->all());
        return Redirect::route('productos.index');
    }
public function store ( StoreProductoRequest $ request ) { $ request -> validate ( [ 'descripcion' => 'requered' , 'precio' => 'required' ] ) ; Productos :: create ( $ request -> all ( ) ) ; return Redirect :: route ( 'productos.index' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .