Expand notifications

This commit is contained in:
James Cole
2022-09-23 06:05:22 +02:00
parent d2c52b47f1
commit 4ca346fc4d
6 changed files with 146 additions and 31 deletions

View File

@@ -44,7 +44,6 @@ class WarnAboutBills implements ShouldQueue
private Carbon $date;
private bool $force;
/**
* Create a new job instance.
*
@@ -54,16 +53,16 @@ class WarnAboutBills implements ShouldQueue
*/
public function __construct(?Carbon $date)
{
$newDate = new Carbon;
$newDate->startOfDay();
$this->date = $newDate;
if (null !== $date) {
$newDate = clone $date;
$newDate->startOfDay();
$this->date = $newDate;
}
if (null === $date) {
$newDate = new Carbon;
$newDate->startOfDay();
$this->date = $newDate;
}
$this->force = false;
Log::debug(sprintf('Created new WarnAboutBills("%s")', $this->date->format('Y-m-d')));