-
I'm curently developing an API using Sanctum with Token auth in addition to my frontend (driven by Inertia). As far as I've understood the documentation permissions are "namespaced" by guard. My goal is to be able to assign one permission that is used by my frontend and my API. Is there any way to do this? Or do I have to create a permission multiple times for each guard and assign it to a user multiple times? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
That is possible, it has already been discussed in other threads, I don't remember which one, check the discussion section |
Beta Was this translation helpful? Give feedback.
-
I've just added |
Beta Was this translation helpful? Give feedback.
I've just added
Forcing Use Of A Single Guard
to the docs:https://spatie.be/docs/laravel-permission/v5/basic-usage/multiple-guards#content-forcing-use-of-a-single-guard