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

Argument 1 passed to Vyuldashev\\NovaPermission\\RoleBooleanGroup::Vyuldashev\\NovaPermission\\{closure}() must be an instance of Illuminate\\Support\\Collection, null given #114

Closed aniket-magadum closed 4 years ago

aniket-magadum commented 4 years ago

I followed the setup in the README file. I am able to use the MorphToMany fields inside of the App\Nova\User class.

But when I tried to use the RoleBooleanGroup Field I get the error message. Laravel Nova: v2.9.2 Spatie Permissions: 3.5.0

picrenan commented 4 years ago

Same here.

Nova: v2.9.3 Spatie Permissions: 3.5 Laravel: 6.8

aniket-magadum commented 4 years ago

@renanpicanco I will modify the issue later for better discussion

picrenan commented 4 years ago

@aniket-magadum I have changed laravel nova to v2.8 and nova permissions work fine

aniket-magadum commented 4 years ago

Alright @renanpicanco I will try it . Thankyou so much I will keep this issue open maybe someone can fix it

aniket-magadum commented 4 years ago

@renanpicanco I was able to fix this on the current version of Nova. I was missing the HasRoles Trait on the App\User Model

picrenan commented 4 years ago

@aniket-magadum it's worked for me too.

szabizs commented 3 years ago

Adding the HasRoles Trait to the App\User model also solved my issue.