Exemplo n.º 1
0
 public static function builder(Collection $menus, $path, $pattern = 'TREE')
 {
     $result = '';
     $menus = $menus->groupBy('group_icon');
     //        echo '<div style="direction: ltr;">';
     //        \Symfony\Component\VarDumper\VarDumper::dump($menus);
     //        echo '</div>';
     foreach ($menus as $menu) {
         $result .= Menu::html_code($menu, $pattern, $menu->first()->group_alias, 'static', $menu->first()->group_icon, $path);
     }
     return $result;
 }