Skip to content

Commit

Permalink
Refactor date formatting in ChartByMonth.php
Browse files Browse the repository at this point in the history
  • Loading branch information
ewilan-riviere committed Oct 12, 2024
1 parent b967f90 commit fda578e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Filament/Config/FilamentChart/ChartByMonth.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ private function setData(): Collection

$is_sqlite = config('database.default') === 'sqlite';
if ($is_sqlite) {
// date_format('.$this->field.", '%b %Y') as period
// strftime("%b %Y", '.$this->field.') as period
$query = DB::table($this->table)
->selectRaw('
count(id) as total,
Expand Down

0 comments on commit fda578e

Please sign in to comment.