22 lines
395 B
PHP
22 lines
395 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Notifications;
|
||
|
|
||
|
use App\EmailLog;
|
||
|
|
||
|
class EmailDatabaseWriterChannelBase
|
||
|
{
|
||
|
protected function writeToTable(EmailLog $logEntry, $shouldQueue = false)
|
||
|
{
|
||
|
if ($shouldQueue)
|
||
|
{
|
||
|
$logEntry->queued_at = new \DateTime();
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
$logEntry->sent_at = new \DateTime();
|
||
|
}
|
||
|
|
||
|
$logEntry->save();
|
||
|
}
|
||
|
}
|