1 | <?php namespace Arcanesoft\Tracker\ViewComposers\Dashboard; |
||
19 | class LatestThirtyDaysVisitsAndVisitorsComposer extends AbstractViewComposer |
||
20 | { |
||
21 | /* ----------------------------------------------------------------- |
||
22 | | Constants |
||
23 | | ----------------------------------------------------------------- |
||
24 | */ |
||
25 | |||
26 | const VIEW = 'tracker::admin._composers.dashboard.latest-thirty-days-visits-and-visitors-chart'; |
||
27 | |||
28 | /* ----------------------------------------------------------------- |
||
29 | | Properties |
||
30 | | ----------------------------------------------------------------- |
||
31 | */ |
||
32 | |||
33 | /** |
||
34 | * Date format. |
||
35 | * |
||
36 | * @var string |
||
37 | */ |
||
38 | protected $format = 'M-d'; |
||
39 | |||
40 | /* ----------------------------------------------------------------- |
||
41 | | Main Methods |
||
42 | | ----------------------------------------------------------------- |
||
43 | */ |
||
44 | |||
45 | /** |
||
46 | * Compose the view. |
||
47 | * |
||
48 | * @param \Illuminate\Contracts\View\View $view |
||
49 | */ |
||
50 | public function compose(View $view) |
||
66 | |||
67 | /* ----------------------------------------------------------------- |
||
68 | | Other Methods |
||
69 | | ----------------------------------------------------------------- |
||
70 | */ |
||
71 | |||
72 | /** |
||
73 | * Prepare the visitors data. |
||
74 | * |
||
75 | * @param \Carbon\Carbon $start |
||
76 | * @param \Carbon\Carbon $end |
||
77 | * @param \Illuminate\Support\Collection $range |
||
78 | * |
||
79 | * @return \Illuminate\Support\Collection |
||
80 | */ |
||
81 | public function prepareVisitorsData(Carbon $start, Carbon $end, Collection $range) |
||
92 | |||
93 | /** |
||
94 | * Prepare the visits data. |
||
95 | * |
||
96 | * @param \Carbon\Carbon $start |
||
97 | * @param \Carbon\Carbon $end |
||
98 | * @param \Illuminate\Support\Collection $range |
||
99 | * |
||
100 | * @return \Illuminate\Support\Collection |
||
101 | */ |
||
102 | private function prepareVisitsData(Carbon $start, Carbon $end, $range) |
||
114 | } |
||
115 |