mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-11 18:56:42 +02:00
feat: add map analytics, add episodes analytics, clean analytics page layout, translate countries
This commit is contained in:
parent
196920d62f
commit
07eae83a00
27 changed files with 705 additions and 192 deletions
|
|
@ -36,7 +36,7 @@ class AnalyticsPodcastModel extends Model
|
|||
$found = $this->select('`date` as `labels`, `hits` as `values`')
|
||||
->where([
|
||||
'`podcast_id`' => $podcastId,
|
||||
'`date` >' => date('Y-m-d', strtotime('-1 year')),
|
||||
'`date` >' => date('Y-m-d', strtotime('-60 days')),
|
||||
])
|
||||
->orderBy('`labels`', 'ASC')
|
||||
->findAll();
|
||||
|
|
@ -60,7 +60,6 @@ class AnalyticsPodcastModel extends Model
|
|||
->selectSum('`hits`', '`values`')
|
||||
->where([
|
||||
'`podcast_id`' => $podcastId,
|
||||
'`date` >' => date('Y-m-d', strtotime('-1 year')),
|
||||
])
|
||||
->groupBy('`labels`')
|
||||
->orderBy('`labels`', 'ASC')
|
||||
|
|
@ -94,7 +93,7 @@ class AnalyticsPodcastModel extends Model
|
|||
)
|
||||
->where([
|
||||
'`podcast_id`' => $podcastId,
|
||||
'`date` >' => date('Y-m-d', strtotime('-1 year')),
|
||||
'`date` >' => date('Y-m-d', strtotime('-60 days')),
|
||||
])
|
||||
->orderBy('`labels`', 'ASC')
|
||||
->findAll();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue