© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
How to check user roles in canAccessPanel() - Tuto's Laravel Corner
TLC
Tuto's Laravel Corner
•
3y ago
•
54 replies
JamesTechDude
How to check user roles in canAccessPanel()
Hello
, I can
't seem to find the code to use to check if a role is assigned to a user from database into canAccessPanel
(
)
I need to check
:
role
_user pivot table
Admin has role
_id 1
, user
_id 1
Company user has role
_id 2
, user
_id 2
(for this example
, but many users will have role
_id 2
)
I have a different panel for each
.
.
. AdminPanelProvider for Admin Role
, CompanyPanelProvider for Company Role
I tried checking documentation and online and can
't figure this out
Thank you in advanced
!
Next page
Similar Threads
Pivot table and user roles
TLC
Tuto's Laravel Corner / 💡filament
2y ago
How to set company_id in role_user table
TLC
Tuto's Laravel Corner / 💡filament
3y ago
display information about the logged in user at the user resource level
TLC
Tuto's Laravel Corner / 💡filament
3y ago
is there a way to make tabs filter optional according to roles
TLC
Tuto's Laravel Corner / 💡filament
3y ago