| 1 | <?php namespace Arcanesoft\Blog\ViewComposers\Admin\Dashboard; |
||
| 12 | class CommentsCountComposer extends AbstractComposer |
||
| 13 | { |
||
| 14 | /* ------------------------------------------------------------------------------------------------ |
||
| 15 | | Constants |
||
| 16 | | ------------------------------------------------------------------------------------------------ |
||
| 17 | */ |
||
| 18 | const VIEW = 'blog::admin._composers.dashboard.comments-total-box'; |
||
| 19 | |||
| 20 | /* ------------------------------------------------------------------------------------------------ |
||
| 21 | | Main Functions |
||
| 22 | | ------------------------------------------------------------------------------------------------ |
||
| 23 | */ |
||
| 24 | /** |
||
| 25 | * Compose the view. |
||
| 26 | * |
||
| 27 | * @param \Illuminate\Contracts\View\View $view |
||
| 28 | */ |
||
| 29 | public function compose(View $view) |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Get the cached comments. |
||
| 39 | * |
||
| 40 | * @return \Illuminate\Database\Eloquent\Collection |
||
| 41 | */ |
||
| 42 | // protected function cachedComments() |
||
| 43 | // { |
||
| 44 | // return $this->cacheResults('comments.all', function () { |
||
| 45 | // return Comment::all(); |
||
| 46 | // }); |
||
| 47 | // } |
||
| 48 | } |
||
| 49 |