How can a Email Notification for password reset be sent from Nova Actions for a User?

There is an InvitationNotification which runs on using Action on Users Invitation Action – public … Read more How can a Email Notification for password reset be sent from Nova Actions for a User?

There is an InvitationNotification which runs on using Action on Users

Invitation Action –

 public function handle(ActionFields $fields, Collection $models)
    {
        foreach ($models as $model) {
            $model->notify(new InvitationNotification($model->email));
            $model->invitation_sent = true;
            $model->save();
        }
    }

Invitation Notification-

public function toMail($notifiable)
    {
        return (new MailMessage)
            ->action(Lang::get('Reset Password'), url('/')); //the password.reset url with token
    }
Route::get('/reset-password/{token}', [NewPasswordController::class, 'create'])->name('password.reset');

How can the invitation be sent for the selected user where the URL will lead to the reset password with the token?

I have tried – creating a random token based on email for it, but it gives errors

Source: Vue – Stack Overflow



Leave a Reply

Your email address will not be published. Required fields are marked *