Open donchoborisov opened 3 years ago
Voyager only provides the HTML with proper bootstrap classes, you'll have to provide the CSS yourself
This will output your menu in an unstyled unordered list. If you do use bootstrap to stylize your web app you can pass a second argument to the menu display method telling it that you want to stylize the menu with bootstrap styles like so
@donchoborisov which version of bootstrap are you using? Can you look at the source and confirm whether there are any classes on those menu elements?
Hi there thank you for your response. I am using bootstrap@4.5.3
<li class="nav-item"><a class="nav-link text-light text-uppercase font-weight-bold px-3">{{menu('main-menu','bootstrap')}}</a></li>
The 2nd question was actually the more important one. I meant can you check in the browser and confirm that the rendered menu has classes attached to it.
I believe that view was written for bootstrap 3, not 4. I haven't used bootstrap in a while, so I can't say for certain if the class names being used changed between versions.
let me see how it looks in bootstrap 3
same the list is coming unstyled
Okay, can you share the rendered markup in your browser dev-tools? I'd like to see exactly what the browser is seeing
I manage to get the menus styled with this code but im not too sure how i can get the submenus now
@php
$menu = DB::select('select * from menu_items where menu_id=2');
@endphp
Version information
Laravel: v7.0 Voyager: v1.4.2 PHP: 7.3.# Database: Mysq
Description
HI there, I am trying to add my menu on the front-end following the instructions from your page.
Steps To Reproduce
Steps to reproduce the behavior: 1.I create the menu with menu builder
Screenshots
Additional context
Add any other context about the problem here.