© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
20 replies
Daniel Reales

Send email after register user

Hi guys, I have a simple user registration form to input the name and email, and I need that when the user registers, an email is automatically sent to reset the password.

I have this form. I'm using afterCreate hook with this:


protected function afterCreate(): void
    {
        $user = $this->record;
        $token = app('auth.password.broker')->createToken($user);
        $notification = new ResetPassword($token);
        $notification->url = Filament::getResetPasswordUrl($token, $user);
        $user->notify($notification);
    }

protected function afterCreate(): void
    {
        $user = $this->record;
        $token = app('auth.password.broker')->createToken($user);
        $notification = new ResetPassword($token);
        $notification->url = Filament::getResetPasswordUrl($token, $user);
        $user->notify($notification);
    }


But I receive Field 'password' doesn't have a default value. Have I save a random value before to create user?
image.png
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Send Email Verification to user
FilamentFFilament / ❓┊help
3y ago
Register Email Verification
FilamentFFilament / ❓┊help
3y ago
Send Email
FilamentFFilament / ❓┊help
2y ago
Send Email
FilamentFFilament / ❓┊help
3y ago