| @@ 20-36 (lines=17) @@ | ||
| 17 | use Gitamin\Models\Project; |
|
| 18 | use Illuminate\Contracts\View\View; |
|
| 19 | ||
| 20 | class AdminComposer |
|
| 21 | { |
|
| 22 | /** |
|
| 23 | * Bind data to the view. |
|
| 24 | * |
|
| 25 | * @param \Illuminate\Contracts\View\View $view |
|
| 26 | * |
|
| 27 | * @return void |
|
| 28 | */ |
|
| 29 | public function compose(View $view) |
|
| 30 | { |
|
| 31 | $view->withIssueCount(Issue::all()->count()); |
|
| 32 | $view->withProjectCount(Project::all()->count()); |
|
| 33 | $view->withGroupCount(Group::IsGroup()->Mine()->count()); |
|
| 34 | $view->withMomentCount(Moment::all()->count()); |
|
| 35 | } |
|
| 36 | } |
|
| 37 | ||
| @@ 20-36 (lines=17) @@ | ||
| 17 | use Gitamin\Models\Project; |
|
| 18 | use Illuminate\Contracts\View\View; |
|
| 19 | ||
| 20 | class DashboardComposer |
|
| 21 | { |
|
| 22 | /** |
|
| 23 | * Bind data to the view. |
|
| 24 | * |
|
| 25 | * @param \Illuminate\Contracts\View\View $view |
|
| 26 | * |
|
| 27 | * @return void |
|
| 28 | */ |
|
| 29 | public function compose(View $view) |
|
| 30 | { |
|
| 31 | $view->withIssueCount(Issue::all()->count()); |
|
| 32 | $view->withProjectCount(Project::all()->count()); |
|
| 33 | $view->withGroupCount(Group::IsGroup()->Mine()->count()); |
|
| 34 | $view->withMomentCount(Moment::all()->count()); |
|
| 35 | } |
|
| 36 | } |
|
| 37 | ||