orderBy('lft') ->get(); $view->with('mainCategories',$cats); }); } }