| @@ 11-50 (lines=40) @@ | ||
| 8 | use Illuminate\Notifications\Messages\MailMessage; |
|
| 9 | use Illuminate\Notifications\Messages\BroadcastMessage; |
|
| 10 | ||
| 11 | class ConfirmEmail extends Notification implements ShouldQueue |
|
| 12 | { |
|
| 13 | use Queueable; |
|
| 14 | ||
| 15 | /** |
|
| 16 | * Create a new notification instance. |
|
| 17 | * |
|
| 18 | * @return void |
|
| 19 | */ |
|
| 20 | public function __construct() |
|
| 21 | { |
|
| 22 | // |
|
| 23 | } |
|
| 24 | ||
| 25 | /** |
|
| 26 | * Get the notification's delivery channels. |
|
| 27 | * |
|
| 28 | * @param mixed $notifiable |
|
| 29 | * @return array |
|
| 30 | */ |
|
| 31 | public function via($notifiable) |
|
| 32 | { |
|
| 33 | return ['mail']; |
|
| 34 | } |
|
| 35 | ||
| 36 | /** |
|
| 37 | * Get the mail representation of the notification. |
|
| 38 | * |
|
| 39 | * @param mixed $notifiable |
|
| 40 | * @return \Illuminate\Notifications\Messages\MailMessage |
|
| 41 | */ |
|
| 42 | public function toMail($notifiable) |
|
| 43 | { |
|
| 44 | return (new MailMessage) |
|
| 45 | ->subject('Email verification') |
|
| 46 | ->line('Email verification') |
|
| 47 | ->line('To validate your email click on the button below') |
|
| 48 | ->action('Verify your email', config('confrim_email_url') . '/' . $notifiable->confirmation_code); |
|
| 49 | } |
|
| 50 | } |
|
| @@ 11-52 (lines=42) @@ | ||
| 8 | use Illuminate\Notifications\Messages\MailMessage; |
|
| 9 | use Illuminate\Notifications\Messages\BroadcastMessage; |
|
| 10 | ||
| 11 | class ResetPassword extends Notification implements ShouldQueue |
|
| 12 | { |
|
| 13 | use Queueable; |
|
| 14 | ||
| 15 | protected $token; |
|
| 16 | ||
| 17 | /** |
|
| 18 | * Create a new notification instance. |
|
| 19 | * |
|
| 20 | * @return void |
|
| 21 | */ |
|
| 22 | public function __construct($token) |
|
| 23 | { |
|
| 24 | $this->token = $token; |
|
| 25 | } |
|
| 26 | ||
| 27 | /** |
|
| 28 | * Get the notification's delivery channels. |
|
| 29 | * |
|
| 30 | * @param mixed $notifiable |
|
| 31 | * @return array |
|
| 32 | */ |
|
| 33 | public function via($notifiable) |
|
| 34 | { |
|
| 35 | return ['mail']; |
|
| 36 | } |
|
| 37 | ||
| 38 | /** |
|
| 39 | * Get the mail representation of the notification. |
|
| 40 | * |
|
| 41 | * @param mixed $notifiable |
|
| 42 | * @return \Illuminate\Notifications\Messages\MailMessage |
|
| 43 | */ |
|
| 44 | public function toMail($notifiable) |
|
| 45 | { |
|
| 46 | return (new MailMessage) |
|
| 47 | ->subject('Reset passowrd') |
|
| 48 | ->line('Reset passowrd') |
|
| 49 | ->line('To reset your password click on the button below') |
|
| 50 | ->action('Reset password', config('reset_password_url') . '/' . $this->token); |
|
| 51 | } |
|
| 52 | } |
|