Level 102
Typo
assingRole <- wrong
assignRole //YAY
Call to undefined method App\Models\User::assingRole()
1 like
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
hello , i used spatie laravel permission package for assigning roles and permissions . i also add HasRolestrait to User model
when i want to assign a role to user with $user->assignRole('Super Admin') it got error
so what's the problem
BadMethodCallException: Call to undefined method App\Models\User::assingRole() in E:\xampp 8\htdocs\rcf\backend\src\vendor\laravel\framework\src\Illuminate\Support\Traits\ForwardsCalls.php:71
could someone help me ?
Typo
assingRole <- wrong
assignRole //YAY
Call to undefined method App\Models\User::assingRole()
Please or to participate in this conversation.