| Conditions | 2 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | public function handle() |
||
| 31 | { |
||
| 32 | $this->info('Prefetching analytics data...'); |
||
| 33 | |||
| 34 | if (empty(config('laravel-analytics.view_id'))) { |
||
| 35 | $this->warn('No view id configured!'); |
||
| 36 | |||
| 37 | return; |
||
| 38 | } |
||
| 39 | |||
| 40 | Analytics::fetchTotalVisitorsAndPageViews(Period::days(14)); |
||
| 41 | Analytics::fetchTotalVisitorsAndPageViews(Period::days(365)); |
||
| 42 | Analytics::fetchMostVisitedPages(Period::days(365)); |
||
| 43 | Analytics::fetchTopReferrers(Period::days(365)); |
||
| 44 | Analytics::fetchTopBrowsers(Period::days(365)); |
||
| 45 | |||
| 46 | $this->info('Analytics data prefetched!'); |
||
| 47 | } |
||
| 48 | } |
||
| 49 |