我在更改Sakai 11中的默认帐户类型时遇到麻烦。特别是在$data = $request->all()['data'];
$all_ids = array_map(function($category){
Category::updateOrCreate(['id' => $category['id']], ['name' => $category['name'],
'order' => $category['order']]);
return $category['id'];
}, $data);
Category::whereNotIn('id', $all_ids)->delete();
foreach($data as $category) {
$child = Category::find($category['id']);
$child->parent()->associate(Category::find($category['parent_id']));
$child->save();
}
工具New Account
表单中,有一个禁用字段,总是填充New account
值。
我基本上是想让新用户决定他们是否想要具有guest
或access
角色的帐户。
预先感谢。