diff --git a/app/Models/AnalyticsPodcastModel.php b/app/Models/AnalyticsPodcastModel.php index 82e5711330bd95c69e7d7480db760cec0500837e..680ca78d00e7a7577c0b1cf032bd555b13091bad 100644 --- a/app/Models/AnalyticsPodcastModel.php +++ b/app/Models/AnalyticsPodcastModel.php @@ -64,8 +64,8 @@ class AnalyticsPodcastModel extends Model '`podcast_id`' => $podcastId, '`date` >' => date('Y-m-d', strtotime('-1 year')), ]) - ->orderBy('`date`', 'ASC') - ->groupBy('concat(month(`date`),"-",year(`date`))') + ->groupBy('`labels`') + ->orderBy('`labels`', 'ASC') ->findAll(); cache()->save( @@ -131,8 +131,8 @@ class AnalyticsPodcastModel extends Model ->where([ '`podcast_id`' => $podcastId, ]) - ->groupBy('concat(month(`date`),"-",year(`date`))') - ->orderBy('`date`', 'ASC') + ->groupBy('`labels`') + ->orderBy('`labels`', 'ASC') ->findAll(); cache()->save(