1 | <?php namespace Arcanesoft\Blog\ViewComposers\Dashboard; |
||
14 | class CategoriesRatiosComposer extends AbstractComposer |
||
15 | { |
||
16 | /* ------------------------------------------------------------------------------------------------ |
||
17 | | Constants |
||
18 | | ------------------------------------------------------------------------------------------------ |
||
19 | */ |
||
20 | const VIEW = 'blog::admin._composers.dashboard.categories-ratios-chart'; |
||
21 | |||
22 | /* ------------------------------------------------------------------------------------------------ |
||
23 | | Main Functions |
||
24 | | ------------------------------------------------------------------------------------------------ |
||
25 | */ |
||
26 | public function compose(View $view) |
||
32 | |||
33 | /* ------------------------------------------------------------------------------------------------ |
||
34 | | Other Functions |
||
35 | | ------------------------------------------------------------------------------------------------ |
||
36 | */ |
||
37 | /** |
||
38 | * Prepare the categories ratios. |
||
39 | * |
||
40 | * @param \Illuminate\Database\Eloquent\Collection $categories |
||
41 | * |
||
42 | * @return \Illuminate\Database\Eloquent\Collection |
||
43 | */ |
||
44 | private function prepareRatios(Collection $categories) |
||
66 | |||
67 | /** |
||
68 | * Colorize the ratios. |
||
69 | * |
||
70 | * @param \Illuminate\Database\Eloquent\Collection $ratios |
||
71 | * |
||
72 | * @return \Illuminate\Database\Eloquent\Collection |
||
73 | */ |
||
74 | private function colorizeRatios(Collection $ratios) |
||
82 | } |
||
83 |