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:
But I receive Field 'password' doesn't have a default value. Have I save a random value before to create user?
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);
}
But I receive Field 'password' doesn't have a default value. Have I save a random value before to create user?
