for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Slides\Connector\Auth\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
use Illuminate\Notifications\Messages\MailMessage;
class ResetPasswordNotification extends Notification
{
use Queueable;
/**
* @var string
*/
protected $token;
* Create a new notification instance.
*
* @param string $token
* @return void
public function __construct(string $token)
$this->token = $token;
}
* Get the notification's delivery channels.
* @param mixed $notifiable
* @return array
public function via($notifiable)
return ['mail'];
* Build the mail representation of the notification.
* @param \Illuminate\Contracts\Auth\CanResetPassword $notifiable
* @return \Illuminate\Notifications\Messages\MailMessage
public function toMail($notifiable)
$email = encrypt($notifiable->getEmailForPasswordReset());
$link = route('password.reset', ['token' => $this->token, 'email' => $email]);
return (new MailMessage)
->line('You are receiving this email because we received a password reset request for your account.')
->action('Reset Password', $link)
->line('If you did not request a password reset, no further action is required.');
* Get the array representation of the notification.
public function toArray($notifiable)
return [
//
];