Skip to content

Commit

Permalink
Merge pull request #8 from coralsio/fix-mysql-date-format
Browse files Browse the repository at this point in the history
fix mysql date_format issue
  • Loading branch information
saeed-corals authored Dec 17, 2023
2 parents dfcebdf + 198653e commit f0bbb3b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Common/Widgets/MonthlyRevenueWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit f0bbb3b

Please sign in to comment.