Someline\Api\Controllers\UsersController::update PHP Method

update() public method

Update the specified resource in storage.
public update ( UserUpdateRequest $request, string $id ) : Response
$request Someline\Http\Requests\UserUpdateRequest
$id string
return Response
    public function update(UserUpdateRequest $request, $id)
    {
        $this->validator->with($request->all())->passesOrFail(ValidatorInterface::RULE_UPDATE);
        $user = $this->repository->update($request->all(), $id);
        // throw exception if update failed
        //        throw new UpdateResourceFailedException('Failed to update.');
        // Updated, return 204 No Content
        return $this->response->noContent();
    }