43 lines
953 B
PHP
43 lines
953 B
PHP
<?php
|
|
|
|
namespace App\Notifications;
|
|
|
|
use App\Mail\MailableBase;
|
|
use App\Mail\UserSelfActivated as UserSelfActivatedMailable;
|
|
use App\User;
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Notifications\Notification;
|
|
|
|
class UserSelfActivated extends Notification
|
|
{
|
|
use Queueable;
|
|
use DatabaseEmailNotification;
|
|
|
|
private $createdUser;
|
|
|
|
/**
|
|
* Create a new notification instance.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function __construct(User $createdUser)
|
|
{
|
|
$this->createdUser = $createdUser;
|
|
}
|
|
|
|
/**
|
|
* Get the mail representation of the notification.
|
|
*
|
|
* @param mixed $notifiable
|
|
* @return \Illuminate\Notifications\Messages\MailMessage|MailableBase
|
|
*/
|
|
public function toMail($notifiable)
|
|
{
|
|
$mailable = new UserSelfActivatedMailable($notifiable, $this->createdUser);
|
|
|
|
$this->setPropertiesOnMailable($mailable, $notifiable);
|
|
|
|
return $mailable;
|
|
}
|
|
}
|