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

samuelolavo's avatar

The given role or permission should use guard `` instead of `web`.

Hello, I´m using metronic 8.2.1 Laravel and am using LdapRecord for authentication; however, I've encountered an error. "The given role or permission should use guard `` instead of web" . Additionally, when I attempt to access the roles in order to view them, I receive this error: 'The LDAP connection [mysql] does not exist. This happens when trying to count users

0 likes
1 reply
manasseg's avatar

Hello @samuelolavo, I had the same issue and adding protected $guard_name = 'web'; in the User Model worked.

1 like

Please or to participate in this conversation.