app/Http/Controllers/API/ProductosController.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)
    {
        $producto = Productos::create($request->all());
        return new ProductosResource($producto);
    }
public function store ( Request $ request ) { $ producto = Productos :: create ( $ request -> all ( ) ) ; return new ProductosResource ( $ producto ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .