From 198653e1cdba118ab2a4a374dea12d7fcc7875fd Mon Sep 17 00:00:00 2001 From: moayad Date: Sun, 17 Dec 2023 01:38:13 +0200 Subject: [PATCH] fix mysql date_format issue --- src/Common/Widgets/MonthlyRevenueWidget.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Common/Widgets/MonthlyRevenueWidget.php b/src/Common/Widgets/MonthlyRevenueWidget.php index d8aff0f..077adae 100644 --- a/src/Common/Widgets/MonthlyRevenueWidget.php +++ b/src/Common/Widgets/MonthlyRevenueWidget.php @@ -17,10 +17,10 @@ public function run($args) if ($connection === 'mysql') { $dateFormatMethod = 'DATE_FORMAT'; - $dateFormat='%M %Y'; + $dateFormat = "'%M %Y'"; } else if ($connection === 'pgsql') { $dateFormatMethod = 'TO_CHAR'; - $dateFormat="'MM-YY'"; + $dateFormat = "'MM-YY'"; } $data = Invoice::where('status', 'paid')->select(