1 | <?php namespace Arcanesoft\Auth\ViewComposers\Dashboard; |
||
17 | class LatestThirtyDaysCreatedUsersComposer extends ViewComposer |
||
18 | { |
||
19 | /* ----------------------------------------------------------------- |
||
20 | | Constants |
||
21 | | ----------------------------------------------------------------- |
||
22 | */ |
||
23 | const VIEW = 'auth::admin._composers.dashboard.lastest-30-days-users-chart'; |
||
24 | |||
25 | /* ----------------------------------------------------------------- |
||
26 | | Properties |
||
27 | | ----------------------------------------------------------------- |
||
28 | */ |
||
29 | /** |
||
30 | * Date format. |
||
31 | * |
||
32 | * @var string |
||
33 | */ |
||
34 | protected $format = 'M-d'; |
||
35 | |||
36 | /* ----------------------------------------------------------------- |
||
37 | | Main Methods |
||
38 | | ----------------------------------------------------------------- |
||
39 | */ |
||
40 | /** |
||
41 | * Compose the view. |
||
42 | * |
||
43 | * @param \Illuminate\Contracts\View\View $view |
||
44 | */ |
||
45 | public function compose(View $view) |
||
59 | |||
60 | /* ----------------------------------------------------------------- |
||
61 | | Other Methods |
||
62 | | ----------------------------------------------------------------- |
||
63 | */ |
||
64 | /** |
||
65 | * Prepare the users data. |
||
66 | * |
||
67 | * @param \Carbon\Carbon $start |
||
68 | * @param \Carbon\Carbon $end |
||
69 | * |
||
70 | * @return \Illuminate\Support\Collection |
||
71 | */ |
||
72 | public function prepareUsersData(Carbon $start, Carbon $end) |
||
83 | |||
84 | /** |
||
85 | * Get the dates ranges. |
||
86 | * |
||
87 | * @param \Carbon\Carbon $start |
||
88 | * @param \Carbon\Carbon $end |
||
89 | * |
||
90 | * @return \Illuminate\Support\Collection |
||
91 | */ |
||
92 | private function getDatesRange(Carbon $start, Carbon $end) |
||
102 | } |
||
103 |