Adding more info after Filament User logged in.
Hi guys, in many Laravel projects I have altered the users table, adding more columns such as "current_sign_in_ip", "sign_in_count", etc. This is the first time for me with Filament, and I need help to understand how to store this new data info after the user has properly logged in. I already have my custom class "Login" (which I am obviously using) where I have overridden "getCredentialsFromFormData" protected function. Everything is working really well, I just need to fill my new custom columns. Where should I do that? Should I alter somehow the "authenticate" function? Or should I alter the login form by adding hidden fields? Thanks in advance for your help.
Loris
Solution:Jump to solution
You could use events https://laraveldaily.com/tip/custom-authentication-events
Laravel Daily
Custom Authentication Events
3 Replies
Or maybe should I take advantage of "afterStateUpdated" or something similar 🤔
Solution
You could use events https://laraveldaily.com/tip/custom-authentication-events
Laravel Daily
Custom Authentication Events
Uh! thanks @Aivirth ! I'll try right now! 🤩
Thanks @Aivirth . Working great! Cheers.