-
Notifications
You must be signed in to change notification settings - Fork 60
Dividers
Shea Lewis edited this page Apr 25, 2015
·
6 revisions
Adding a divider after a menu item is simple, and you have a couple ways of going about it as detailed below.
$menu->add('Item Link', 'item/link')->divide();
$menu->add('Item Link', 'item/link');
$menu->divide();
Both methods above will achieve the same results, by adding a new divider item after your link. So, if you were to use the asUl()
method, you would get the following HTML:
<ul>
<li><a href="item/link">Item Link</a></li>
<li class="divider"></li>
</ul>
If you are building your own menu from scratch (a Bootstrap navbar for example), you can easily check to see if an item has a divider and add it:
@if ($item->divider)
<li {{ \HTML::attributes($item->divider) }}></li>
@endif
🔴 Best Temporary Email - https://1secmail.ru 🔴