Send Users a Welcome Notification to Set an Initial Password

Packages

November 18th, 2019

laravel-welcome-notification.png

Laravel Welcome Notification is a new package by Freek Van der Herten to send a welcome notification to new users. The welcome notification contains a secure link where the new user can set an initial password.

The package adds a welcome_valid_until column to the users database table, which the package uses to generate a temporary signed route. You can kick off the process of sending the welcome email and set the validation expiration date:

1$expiresAt = now()->addDay();
2
3$user->sendWelcomeNotification($expiresAt);

This package has quite a few customization options, such as customizing the mail message or swapping out an entirely different notification class. Be sure to check out the readme.

You can learn more about this package, get full installation instructions, and view the source code on GitHub at spatie/laravel-welcome-notification.

Filed in:

Paul Redmond

Full stack web developer. Author of Lumen Programming Guide and Docker for PHP Developers.