where('status', 1) ->column('id'); $authList = implode(',', $authList); // 设置数据 $rows= [ [ 'title' => '管理员' ,'rules' => $authList ,'miaoshu' => '拥有所有权限' ] ]; // 保存数据 $this->table('auth_group')->insert($rows)->save(); } }