感觉没头没尾的,突然用 $this->user ()->getAllPermissions ()
不是说好没买过第二本的用户只需要认真读本教程就好了吗...这跳跃有点大啊
直接写$this->user()->getAllPermissions();会报错Call to undefined method App\Models\User::getAllPermissions()
需要在User里面加入use HasRoles
推荐文章: