vyuldashev / nova-permission

A Laravel Nova tool for Spatie's laravel-permission library
https://novapackages.com/packages/vyuldashev/nova-permission
419 stars 217 forks source link

Call to undefined method App\Models\User::roles() #151

Closed ahmadhidayatullah closed 3 years ago

ahmadhidayatullah commented 3 years ago

Hi, i just instaled this package and i got a message error Call to undefined method App\Models\User::roles() and Call to undefined method App\Models\User::permissions().

martinkolarov commented 3 years ago

Make sure to publish the migrations from the Spatie\Permission\PermissionServiceProvider, as well as add the HasRoles trait to your User model. Those steps are not documented in the installation, but are absolutely necessary to get this package working.