コード例 #1
0
 public function compose(View $view)
 {
     $catTree = null;
     /* if(\Cache::has('tree')) {
                 $catTree = \Cache::get('tree');
             }
             else {
                 \Cache::put('tree', $this->category->get()->toTree(), Carbon::now()->addDay());
                 $catTree = \Cache::get('tree');
     
             }*/
     $catTree = $this->category->get()->toTree();
     $view->with('categories', Helper::treeToArray($catTree));
 }