Call to undefined method App\Models\User::hasRole() #1742
Answered
by
drbyte
VerlengsnoerNL
asked this question in
Q&A
-
Call to undefined method App\Models\User::hasRole() (View: /var/www/html/clientarea/resources/views/layouts/header.blade.php) Wanneer ik @hasrole('admin') in het bestand zet, please help !! |
Beta Was this translation helpful? Give feedback.
Answered by
drbyte
May 14, 2021
Replies: 1 comment
-
Must add the |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
drbyte
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Must add the
HasRoles
trait to your User model, as described in the documentation:https://spatie.be/docs/laravel-permission/v4/basic-usage/basic-usage