add this to your user model: use HasRoles, HasPermissions; this would add the basic role/perms from spatie
then add protected $with = ['roles', 'permissions'];
it will autoload the values
then in your UserController, just return user object
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community