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 UserRejected 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)
|
|
|
|
{
|
|
|
|
parent::__construct();
|
|
|
|
|
|
|
|
$this->user = $user;
|
|
|
|
|
|
|
|
$this->setMailable(
|
|
|
|
'Your registration has been denied',
|
|
|
|
'notifications.mail.user.rejected',
|
|
|
|
['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,
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|