F
Filamentβ€’12mo ago
Daniel Plomp

Create User in Filament and sent verification email

I don't understand what I should be doing to automatically sent a verification email, when I create a User in Filament. I have a simple UserResource that let's me create users. I have implemented the MustVerifyEmail interface on my User model and also setup Mail capabilities. My Laravel project is using JetStream. Also, when trying to reset the password for the current user, through Filament, it says doesn't sent an email to do so. Only if I reset my password from the Laravel Jetstream page, it sent an email. Am I forgetting something? This is in my AdminPanelProvider:
return $panel
->default()
->maxContentWidth('screen-2xl')
->id('admin')
->path('admin')
->login()
->emailVerification()
->profile()
->passwordReset()
return $panel
->default()
->maxContentWidth('screen-2xl')
->id('admin')
->path('admin')
->login()
->emailVerification()
->profile()
->passwordReset()
5 Replies
Lara Zeus
Lara Zeusβ€’12mo ago
you have to do it manually in after Create hook
Daniel Plomp
Daniel PlompOPβ€’12mo ago
You mean in the User Model?
Daniel Plomp
Daniel PlompOPβ€’12mo ago
OK, clear. But is there any existing function I can call to handle this? I guess I should only have to sent an email?
Lara Zeus
Lara Zeusβ€’12mo ago
no there isn't because as you said it's just an email, also if you dig the code of the register controller in jetstream you literally can copy and paste πŸ™‚
Want results from more Discord servers?
Add your server