fix(analytics): remove charts empty values + remove useless language cache

fix(install): edit host_url helper and remove back() when create .env
This commit is contained in:
Benjamin Bellamy 2020-10-19 16:47:22 +00:00
commit 1678794153
8 changed files with 21 additions and 21 deletions

View file

@ -64,7 +64,9 @@ class AnalyticsWebsiteByRefererModel extends Model
if (
!($found = cache("{$podcastId}_analytics_website_by_domain_weekly"))
) {
$found = $this->select('`domain` as `labels`')
$found = $this->select(
'SUBSTRING_INDEX(`domain`, \'.\', -2) as `labels`'
)
->selectSum('`hits`', '`values`')
->where([
'`podcast_id`' => $podcastId,
@ -95,7 +97,9 @@ class AnalyticsWebsiteByRefererModel extends Model
if (
!($found = cache("{$podcastId}_analytics_website_by_domain_yearly"))
) {
$found = $this->select('`domain` as `labels`')
$found = $this->select(
'SUBSTRING_INDEX(`domain`, \'.\', -2) as `labels`'
)
->selectSum('`hits`', '`values`')
->where([
'`podcast_id`' => $podcastId,