app/Http/Controllers/UserController.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(UserUpdateRequest $request, $id)
    {
        \Gate::authorize('edit', 'users');
        $user = User::find($id);
        $user->update($request->only('first_name', 'last_name', 'email', 'role_id'));
        return \response(new UserResource($user), Response::HTTP_ACCEPTED);
    }
public function update ( UserUpdateRequest $ request , $ id ) { \ Gate :: authorize ( 'edit' , 'users' ) ; $ user = User :: find ( $ id ) ; $ user -> update ( $ request -> only ( 'first_name' , 'last_name' , 'email' , 'role_id' ) ) ; return \ response ( new UserResource ( $ user ) , Response :: HTTP_ACCEPTED ) ; }
Update the specified resource in storage.
Update the specified resource in storage .