source: app/Notifications/ForgotPassword.php

Last change on this file was c5e383e, checked in by beratkjufliju <kufliju@…>, 3 years ago

added db and storage backup

  • Property mode set to 100644
File size: 1.4 KB
RevLine 
[7304c7f]1<?php
2
3namespace App\Notifications;
4
5use App\Models\User;
6use Illuminate\Bus\Queueable;
7use Illuminate\Notifications\Notification;
8use Illuminate\Notifications\Messages\MailMessage;
9
10class ForgotPassword extends Notification
11{
12 use Queueable;
13
14 private $user;
15
16 /**
17 * Create a new notification instance.
18 *
19 * @return void
20 */
21 public function __construct(User $user)
22 {
23 $this->user = $user;
24 }
25
26 /**
27 * Get the notification's delivery channels.
28 *
29 * @param mixed $notifiable
30 * @return array
31 */
32 public function via($notifiable)
33 {
34 return ['mail'];
35 }
36
37 /**
38 * Get the mail representation of the notification.
39 *
40 * @param mixed $notifiable
41 * @return \Illuminate\Notifications\Messages\MailMessage
42 */
43 public function toMail($notifiable)
44 {
45 return (new MailMessage)
46 ->greeting("Hello " . $this->user->name)
[c5e383e]47 ->line("To change your password click on the button")
[7304c7f]48 ->line("Your security code is: " . $this->user->security_code )
[c5e383e]49 ->action("Change Password", url("/auth/new-password/" . $this->user->id . "/" . $this->user->verify_token));
[7304c7f]50 }
51
52 /**
53 * Get the array representation of the notification.
54 *
55 * @param mixed $notifiable
56 * @return array
57 */
58 public function toArray($notifiable)
59 {
60 return [
61 //
62 ];
63 }
64}
Note: See TracBrowser for help on using the repository browser.