app\controllers\ConfController::actionDeleteRelation PHP Method

actionDeleteRelation() public method

删除项目的用户关系
public actionDeleteRelation ( $id ) : string
return string
    public function actionDeleteRelation($id)
    {
        $group = Group::findOne($id);
        if (!$group) {
            throw new \Exception(yii::t('conf', 'relation not exists'));
        }
        $project = $this->findModel($group->project_id);
        if (!$group->delete()) {
            throw new \Exception(yii::t('w', 'delete failed'));
        }
        $this->renderJson([]);
    }