📜  调用未定义的方法 App\Models\User::assignRole - 任何代码示例

📅  最后修改于: 2022-03-11 14:55:03.592000             🧑  作者: Mango

代码示例1
Add trait use HasRoles; in your user model.

Import it with use Spatie\Permission\Traits\HasRoles; at the top of the model 
file.