2019-11-20 23:16:01 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Notifications\Messages;
|
|
|
|
|
2020-09-04 00:50:42 +08:00
|
|
|
use App\Contracts\Notification;
|
2019-11-20 23:16:01 +08:00
|
|
|
use App\Models\User;
|
|
|
|
use App\Notifications\Channels\MailChannel;
|
|
|
|
|
2020-09-04 00:50:42 +08:00
|
|
|
class UserPending extends Notification
|
2019-11-20 23:16:01 +08:00
|
|
|
{
|
|
|
|
use MailChannel;
|
|
|
|
|
2020-05-09 23:31:25 +08:00
|
|
|
public $channels = ['mail'];
|
|
|
|
|
2019-11-20 23:16:01 +08:00
|
|
|
private $user;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param \App\Models\User $user
|
|
|
|
*/
|
|
|
|
public function __construct(User $user)
|
|
|
|
{
|
2020-05-09 23:31:25 +08:00
|
|
|
parent::__construct();
|
|
|
|
|
2019-11-20 23:16:01 +08:00
|
|
|
$this->user = $user;
|
|
|
|
|
|
|
|
$this->setMailable(
|
|
|
|
'Your registration is pending',
|
|
|
|
'notifications.mail.user.pending',
|
|
|
|
['user' => $this->user]
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the array representation of the notification.
|
|
|
|
*
|
|
|
|
* @param mixed $notifiable
|
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function toArray($notifiable)
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
'user_id' => $this->user->id,
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|