token = $token; } /** * Get the notification's delivery channels. * * @param mixed $notifiable * * @return array */ public function via($notifiable) { return ['mail']; } /** * Get the mail representation of the notification. * * @param mixed $notifiable * * @return \Illuminate\Notifications\Messages\MailMessage */ public function toMail($notifiable) { $url = route('password.reset', ['token' => $this->token, 'email' => $notifiable->email]); return (new MailMessage())->subject(trans('notification.forgottenPassword.subject')) ->line(trans('notification.forgottenPassword.firstLine')) ->action(trans('notification.forgottenPassword.button'), $url) ->line(trans('notification.forgottenPassword.lastLine')); } }