Setting default user role when registering account?
I'm tasked on allowing normal users to register to the panel, alongside normal users there are admin accounts too. I'm using spatie roles and persmissions for managing user roles. I searched everywhere and seems there is no way to directly handle user registration in order to set a default user role, i really need access to registration process as i also have other first i need to take care of. As far as i have seen, the only way to sort of manage to do so is using model events, which is eh not good not bad
3 Replies
I would do this with a model observer.
Could also probably override the registration class. https://filamentphp.com/docs/3.x/panels/users#customizing-the-authentication-features
Thank you, ended up extending it