F
Filamentβ€’2y ago
Oddman

How do I configure the user model to be something like "admin"

Looked over the docs, couldn't find it - wanting to use an Admin model, not User.
4 Replies
josef
josefβ€’2y ago
use a custom guard and tell filament about it
Oddman
OddmanOPβ€’2y ago
Awesome, thanks @justjosef πŸ™‚ Easy as expected. hehe
Medo
Medoβ€’2y ago
Just Add to your panel service provider and add admin as guards in config/auth
$panel->login()
->authGuard('admin')
$panel->login()
->authGuard('admin')
Oddman
OddmanOPβ€’2y ago
@msaidm too slow, alrady got the answer and resolved it πŸ™‚ thanks tho Hmmmm. actually this has ruined the login form πŸ€” It's trying to post to a route that doesn't exist anymore. Weird, just started working. That's really odd.

Did you find this page helpful?