Changeset 1c25bcf for app/Notifications/VerifyUser.php
- Timestamp:
- 10/25/21 21:49:53 (3 years ago)
- Branches:
- develop, master
- Children:
- e756bd9
- Parents:
- 05e57e2
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
app/Notifications/VerifyUser.php
r05e57e2 r1c25bcf 3 3 namespace App\Notifications; 4 4 5 use App\Models\Company; 5 6 use App\Models\User; 7 use App\Services\Hashid; 6 8 use Illuminate\Bus\Queueable; 9 use Illuminate\Contracts\Queue\ShouldQueue; 10 use Illuminate\Notifications\Messages\MailMessage; 7 11 use Illuminate\Notifications\Notification; 8 use Illuminate\Notifications\Messages\MailMessage;9 12 10 class Verify NewEmail extends Notification13 class VerifyUser extends Notification implements ShouldQueue 11 14 { 12 15 use Queueable; 13 16 14 pr ivate$user;17 protected $user; 15 18 16 19 /** … … 27 30 * Get the notification's delivery channels. 28 31 * 29 * @param mixed$notifiable32 * @param mixed $notifiable 30 33 * @return array 31 34 */ … … 38 41 * Get the mail representation of the notification. 39 42 * 40 * @param mixed$notifiable43 * @param mixed $notifiable 41 44 * @return \Illuminate\Notifications\Messages\MailMessage 42 45 */ 43 46 public function toMail($notifiable) 44 47 { 48 $hashId = new Hashid(); 49 45 50 return (new MailMessage) 46 ->greeting(" Hello " . $this->user->name)47 ->line("To verify your new email click the button.")51 ->greeting("Login verification") 52 ->line("To verify click the button and enter your security code.") 48 53 ->line("Your security code is: " . $this->user->security_code) 49 ->action("Verify", url("/auth/verify/" . $this->user->id . "/" . $this->user->verify_token)); 54 ->action("Verify", route("verify-login.index", [ 55 "id" => $hashId->encode($this->user->id), 56 "token" => $this->user->verify_token 57 ])); 50 58 } 51 59 … … 53 61 * Get the array representation of the notification. 54 62 * 55 * @param mixed$notifiable63 * @param mixed $notifiable 56 64 * @return array 57 65 */ … … 62 70 ]; 63 71 } 72 73 64 74 }
Note:
See TracChangeset
for help on using the changeset viewer.