dev-think-one /
laravel-email-change-verification
| 1 | <?php |
||
| 2 | |||
| 3 | namespace EmailChangeVerification\User; |
||
| 4 | |||
| 5 | use EmailChangeVerification\Notifications\EmailChangeNotification; |
||
| 6 | |||
| 7 | trait WithEmailChangeVerification |
||
| 8 | { |
||
| 9 | |||
| 10 | /** |
||
| 11 | * Get the e-mail address where email change verification links are sent. |
||
| 12 | * |
||
| 13 | * @return string |
||
| 14 | */ |
||
| 15 | 14 | public function getEmailForChangeEmail(): string |
|
| 16 | { |
||
| 17 | 14 | return $this->email; |
|
| 18 | } |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Send the verification notification. |
||
| 22 | * |
||
| 23 | * @param string $token |
||
| 24 | * @param string $newEmail |
||
| 25 | * |
||
| 26 | * @return void |
||
| 27 | */ |
||
| 28 | 5 | public function sendEmailChangeNotification(string $token, string $newEmail): void |
|
| 29 | { |
||
| 30 | 5 | $this->notify(new EmailChangeNotification($token, $newEmail)); |
|
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 31 | } |
||
| 32 | } |
||
| 33 |