Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

labeeque's avatar

spatie role and permission not working with sanctum guard

hello, community, I am working on Sanctum with Spatie permissions. it works fine but when I try to find a specific role by find_by_id() it shows errors about not the sanctum guard don't have any role because all my roles and permissions are stored with the web guard. I have read soo many articles n tried manually changing the value web to sanctum in the database, after changing manually it works for that operation but it causes an error in other operations n functions.

0 likes
1 reply

Please or to participate in this conversation.