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