app/Http/Controllers/API/UsersController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(Request $request, $id)
    {
        $request -> validate(Users::reglasValidacion());
        $usuario = Users::findOrFail($id);
        $usuario -> update($request->all());
        return new UsersResource($usuario);
    }
public function update ( Request $ request , $ id ) { $ request -> validate ( Users :: reglasValidacion ( ) ) ; $ usuario = Users :: findOrFail ( $ id ) ; $ usuario -> update ( $ request -> all ( ) ) ; return new UsersResource ( $ usuario ) ; }
Update the specified resource in storage.
Update the specified resource in storage .