* Add test call to test notification #675 * Fix queue driver with emails not sending; formatting #675
This commit is contained in:
@@ -20,7 +20,7 @@ class BaseNotification extends Notification implements ShouldQueue
|
||||
$klass = get_class($this);
|
||||
$notif_config = config('notifications.channels', []);
|
||||
if (!array_key_exists($klass, $notif_config)) {
|
||||
Log::error('Notification type '.$klass.' missing from notifications config');
|
||||
Log::error('Notification type '.$klass.' missing from notifications config, defaulting to mail');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@ use Illuminate\Notifications\Messages\MailMessage;
|
||||
|
||||
trait MailChannel
|
||||
{
|
||||
private $mailSubject;
|
||||
private $mailTemplate;
|
||||
private $mailTemplateArgs;
|
||||
protected $mailSubject;
|
||||
protected $mailTemplate;
|
||||
protected $mailTemplateArgs;
|
||||
|
||||
/**
|
||||
* Set the arguments for the toMail() method
|
||||
|
||||
@@ -10,6 +10,8 @@ class AdminUserRegistered extends BaseNotification
|
||||
{
|
||||
use MailChannel;
|
||||
|
||||
public $channels = ['mail'];
|
||||
|
||||
private $user;
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,6 +10,8 @@ class NewsAdded extends BaseNotification
|
||||
{
|
||||
use MailChannel;
|
||||
|
||||
public $channels = ['mail'];
|
||||
|
||||
private $news;
|
||||
|
||||
public function __construct(News $news)
|
||||
|
||||
@@ -13,6 +13,8 @@ class PirepAccepted extends BaseNotification
|
||||
{
|
||||
use MailChannel;
|
||||
|
||||
public $channels = ['mail'];
|
||||
|
||||
private $pirep;
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,6 +10,8 @@ class PirepRejected extends BaseNotification
|
||||
{
|
||||
use MailChannel;
|
||||
|
||||
public $channels = ['mail'];
|
||||
|
||||
private $pirep;
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,6 +10,8 @@ class PirepSubmitted extends BaseNotification
|
||||
{
|
||||
use MailChannel;
|
||||
|
||||
public $channels = ['mail'];
|
||||
|
||||
private $pirep;
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,6 +10,8 @@ class UserPending extends BaseNotification
|
||||
{
|
||||
use MailChannel;
|
||||
|
||||
public $channels = ['mail'];
|
||||
|
||||
private $user;
|
||||
|
||||
/**
|
||||
@@ -17,6 +19,8 @@ class UserPending extends BaseNotification
|
||||
*/
|
||||
public function __construct(User $user)
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
$this->user = $user;
|
||||
|
||||
$this->setMailable(
|
||||
|
||||
@@ -10,6 +10,8 @@ class UserRegistered extends BaseNotification
|
||||
{
|
||||
use MailChannel;
|
||||
|
||||
public $channels = ['mail'];
|
||||
|
||||
private $user;
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,6 +10,8 @@ class UserRejected extends BaseNotification
|
||||
{
|
||||
use MailChannel;
|
||||
|
||||
public $channels = ['mail'];
|
||||
|
||||
private $user;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user