How with Auth::loginUsingId in seeder to set spatie/permission access? #2207
Unanswered
PetroGromovo
asked this question in
Q&A
Replies: 1 comment
-
Try |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
On laravel 9 site I fill some init data in seeders
and I use line :
and in model_has_permissions table I have a row referenced $defaultAdminId and Admin
permission in permissions table
But later checking is logged is admin
The checks above does not work . I suppose method Auth::loginUsingId( does not know anything about
model_has_permissions table . If there is a way to set spatie/permission access after calling Auth::loginUsingId( ?
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions