1 | <?php namespace Arcanesoft\Tracker\ViewComposers\Dashboard; |
||
15 | class LanguagesListComposer extends AbstractViewComposer |
||
16 | { |
||
17 | /* ----------------------------------------------------------------- |
||
18 | | Constants |
||
19 | | ----------------------------------------------------------------- |
||
20 | */ |
||
21 | |||
22 | const VIEW = 'tracker::admin._composers.dashboard.languages-ratio-list'; |
||
23 | |||
24 | /* ----------------------------------------------------------------- |
||
25 | | Main Methods |
||
26 | | ----------------------------------------------------------------- |
||
27 | */ |
||
28 | |||
29 | /** |
||
30 | * Compose the view. |
||
31 | * |
||
32 | * @param \Illuminate\Contracts\View\View $view |
||
33 | */ |
||
34 | public function compose(View $view) |
||
47 | |||
48 | /* ------------------------------------------------------------------------------------------------ |
||
49 | | Other Functions |
||
50 | | ------------------------------------------------------------------------------------------------ |
||
51 | */ |
||
52 | /** |
||
53 | * Get the languages count from sessions. |
||
54 | * |
||
55 | * @param \Carbon\Carbon $start |
||
56 | * @param \Carbon\Carbon $end |
||
57 | * |
||
58 | * @return \Illuminate\Support\Collection |
||
59 | */ |
||
60 | private function getLanguagesCountFromSessions($start, $end) |
||
78 | |||
79 | /** |
||
80 | * Calculate the languages percentage. |
||
81 | * |
||
82 | * @param \Illuminate\Support\Collection $languages |
||
83 | * |
||
84 | * @return \Illuminate\Support\Collection |
||
85 | */ |
||
86 | private function calculateLanguagesPercentage($languages) |
||
96 | } |
||
97 |