24 lines
589 B
PHP
24 lines
589 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Notifications;
|
||
|
|
||
|
use App\EmailLog;
|
||
|
use Illuminate\Notifications\Notification;
|
||
|
|
||
|
class QueueEmailDatabaseChannel extends EmailDatabaseWriterChannelBase
|
||
|
{
|
||
|
/**
|
||
|
* Send the given notification.
|
||
|
*
|
||
|
* @param mixed $notifiable
|
||
|
* @param \Illuminate\Notifications\Notification $notification
|
||
|
* @return void
|
||
|
*/
|
||
|
public function send($notifiable, Notification $notification)
|
||
|
{
|
||
|
/** @var EmailLog $logEntry */
|
||
|
$logEntry = $notification->toQueueEmailDatabase($notifiable);
|
||
|
|
||
|
$this->writeToTable($logEntry, true);
|
||
|
}
|
||
|
}
|