1 | <?php namespace Arcanesoft\Tracker\ViewComposers\Dashboard; |
||
16 | class CountriesListComposer extends AbstractViewComposer |
||
17 | { |
||
18 | /* ------------------------------------------------------------------------------------------------ |
||
19 | | Constants |
||
20 | | ------------------------------------------------------------------------------------------------ |
||
21 | */ |
||
22 | const VIEW = 'tracker::foundation._composers.dashboard.countries-ratio-list'; |
||
23 | |||
24 | /* ------------------------------------------------------------------------------------------------ |
||
25 | | Main Functions |
||
26 | | ------------------------------------------------------------------------------------------------ |
||
27 | */ |
||
28 | /** |
||
29 | * Compose the view. |
||
30 | * |
||
31 | * @param \Illuminate\Contracts\View\View $view |
||
32 | */ |
||
33 | public function compose(View $view) |
||
46 | |||
47 | /* ------------------------------------------------------------------------------------------------ |
||
48 | | Other Functions |
||
49 | | ------------------------------------------------------------------------------------------------ |
||
50 | */ |
||
51 | /** |
||
52 | * Get the countries count from sessions. |
||
53 | * |
||
54 | * @param \Carbon\Carbon $start |
||
55 | * @param \Carbon\Carbon $end |
||
56 | * |
||
57 | * @return \Illuminate\Support\Collection |
||
58 | */ |
||
59 | 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 |