msurguy / laravel-shop-menu

Menu ordering/management application demo, like Wordpress menu manager
http://laravel-menu-builder.gopagoda.com/admin/menu
334 stars 100 forks source link

get items in front-end #6

Closed robertnicjoo closed 5 years ago

robertnicjoo commented 5 years ago

Hi,

How do I get menu in front-end?

I mean when I use

$menus = TopMenu::orderby('order', 'asc')->get();
$topmenu = new TopMenu;
$topmenu = $topmenu->getHTML($menus);

I will get public function buildMenu($menu, $parentid = 0) from model which is include edit,delete buttons etc. at this point i only need to get menu items in order to show in navbar to users, what should i do?

Thanks.

msurguy commented 5 years ago

@robertnicjoo I believe you are asking about how to get this into a Blade template?

robertnicjoo commented 5 years ago

Yes, looking for simple variable just like we have {!! $menu !!} for admin, same thing for blade instead of looping them. Is there a way to do that?