blue-twilight/app/Notifications/EmailDatabaseWriterChannelBase.php

22 lines
395 B
PHP
Raw Permalink Normal View History

<?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();
}
}