Devise\Users\Groups\GroupManager::updateGroup PHP Method

updateGroup() public method

Update a new Group
public updateGroup ( integer $id, array $input ) : DvsGroup
$id integer
$input array
return DvsGroup $Group
    public function updateGroup($id, $input)
    {
        $validator = $this->Validator->make($input, $this->updateRules($id, $input), array("Could not update group"));
        if ($validator->passes()) {
            $group = $this->Group->findOrFail($id);
            $group->name = $input['name'];
            $group->save();
            return $group;
        }
        $this->errors = $validator->errors()->all();
        $this->message = "There were validation errors.";
        return false;
    }