1 | <?php namespace Arcanesoft\Tracker\ViewComposers\Dashboard; |
||
16 | class CountriesListComposer extends AbstractViewComposer |
||
17 | { |
||
18 | /* ----------------------------------------------------------------- |
||
19 | | Constants |
||
20 | | ----------------------------------------------------------------- |
||
21 | */ |
||
22 | |||
23 | const VIEW = 'tracker::admin._composers.dashboard.countries-ratio-list'; |
||
24 | |||
25 | /* ----------------------------------------------------------------- |
||
26 | | Main Methods |
||
27 | | ----------------------------------------------------------------- |
||
28 | */ |
||
29 | |||
30 | /** |
||
31 | * Compose the view. |
||
32 | * |
||
33 | * @param \Illuminate\Contracts\View\View $view |
||
34 | */ |
||
35 | public function compose(View $view) |
||
48 | |||
49 | /* ----------------------------------------------------------------- |
||
50 | | Other Methods |
||
51 | | ----------------------------------------------------------------- |
||
52 | */ |
||
53 | |||
54 | /** |
||
55 | * Get the countries count from sessions. |
||
56 | * |
||
57 | * @param \Carbon\Carbon $start |
||
58 | * @param \Carbon\Carbon $end |
||
59 | * |
||
60 | * @return \Illuminate\Support\Collection |
||
61 | */ |
||
62 | private function getCountriesCountFromSessions(Carbon $start, Carbon $end) |
||
91 | |||
92 | /** |
||
93 | * Calculate countries percentage. |
||
94 | * |
||
95 | * @param \Illuminate\Support\Collection $countries |
||
96 | * |
||
97 | * @return \Illuminate\Support\Collection |
||
98 | */ |
||
99 | private function calculateCountriesPercentage(Collection $countries) |
||
109 | } |
||
110 |