2021-04-14 15:58:40 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Config;
|
|
|
|
|
|
|
|
use Analytics\Config\Analytics as AnalyticsBase;
|
|
|
|
|
|
|
|
class Analytics extends AnalyticsBase
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* --------------------------------------------------------------------
|
|
|
|
* Route filters options
|
|
|
|
* --------------------------------------------------------------------
|
|
|
|
*/
|
2021-05-18 17:16:36 +00:00
|
|
|
public array $routeFilters = [
|
2021-04-14 15:58:40 +00:00
|
|
|
'analytics-full-data' => 'permission:podcasts-view,podcast-view',
|
|
|
|
'analytics-data' => 'permission:podcasts-view,podcast-view',
|
|
|
|
'analytics-filtered-data' => 'permission:podcasts-view,podcast-view',
|
|
|
|
];
|
|
|
|
|
|
|
|
public function __construct()
|
|
|
|
{
|
|
|
|
parent::__construct();
|
|
|
|
|
|
|
|
// set the analytics gateway behind the admin gateway.
|
|
|
|
// Only logged in users should be able to view analytics
|
2021-05-19 16:35:13 +00:00
|
|
|
$this->gateway = config('App')
|
|
|
|
->adminGateway . '/analytics';
|
2021-04-14 15:58:40 +00:00
|
|
|
}
|
|
|
|
|
2021-05-06 14:00:48 +00:00
|
|
|
/**
|
|
|
|
* get the full audio file url
|
2021-05-12 14:00:25 +00:00
|
|
|
*
|
|
|
|
* @param string|string[] $audioFilePath
|
2021-05-06 14:00:48 +00:00
|
|
|
*/
|
2021-05-12 14:00:25 +00:00
|
|
|
public function getAudioFileUrl($audioFilePath): string
|
2021-04-14 15:58:40 +00:00
|
|
|
{
|
|
|
|
helper('media');
|
|
|
|
|
2021-05-03 17:39:58 +00:00
|
|
|
return media_base_url($audioFilePath);
|
2021-04-14 15:58:40 +00:00
|
|
|
}
|
|
|
|
}
|