Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用spatie/laravel-permission包作为权限系统。但我想使用它,除了密码编辑字段。我必须在哪里修改才能做到这一点?其他方式,我可以在不输入密码字段的情况下编辑角色吗?
这是自我回答。
在 UserController 中的 update() 中删除 validate() 中的密码检查。
$this->validate($request, [ 'name'=>'required|max:120', 'email'=>'required|email|unique:users,email,'.$id, // 'password'=>'required|min:6|confirmed' ]);