forked from apiato/apiato
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(notification): send an email notice to the user on `password cha…
…nge`
- Loading branch information
1 parent
78b7131
commit 760b2e0
Showing
3 changed files
with
40 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
app/Containers/AppSection/User/Notifications/PasswordUpdatedNotification.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
namespace App\Containers\AppSection\User\Notifications; | ||
|
||
use App\Ship\Parents\Models\UserModel; | ||
use App\Ship\Parents\Notifications\Notification; | ||
use Illuminate\Bus\Queueable; | ||
use Illuminate\Contracts\Queue\ShouldQueue; | ||
use Illuminate\Notifications\Messages\MailMessage; | ||
|
||
class PasswordUpdatedNotification extends Notification implements ShouldQueue | ||
{ | ||
use Queueable; | ||
|
||
public function via($notifiable): array | ||
{ | ||
return ['mail']; | ||
} | ||
|
||
public function toMail(UserModel $notifiable): MailMessage | ||
{ | ||
return (new MailMessage()) | ||
->subject('Account Change Notice') | ||
->line('We wanted to let you know that some information was changed for your account:') | ||
->line('Your password has been change.') | ||
->line('If you recently made account changes, please disregard this message. However, if you did NOT make any changes to your account, we recommend you change your password and make appropriate corrections as soon as possible to ensure account security.'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters