- Run
php artisan make:notification MyResetPasswordto create a Notification ClassMyResetPasswordatapp/Notifications - add
use App\Notifications\MyResetPassword;to the User model - Add this method to User model:
public function sendPasswordResetNotification($token)
{
$this->notify(new MyResetPassword($token));
}
- Run
php artisan command php artisan vendor:publish --tag=laravel-notificationsto publish the email templates atresources/views/vendor/notifications - Override the
toMail()method atMyResetPasswordclass if needed. Instructions: https://laravel.com/docs/5.6/notifications - Open the
resources/views/vendor/notifications/email.blade.phpand customize it
Source: https://stackoverflow.com/a/39610301
Laracast video: https://laracasts.com/series/whats-new-in-laravel-5-3/episodes/9