@@ -2,7 +2,12 @@ |
||
| 2 | 2 | @if ($menu) |
| 3 | 3 | <{{ $menu->getType() }}{!! $menu->buildAttributes() !!}> |
| 4 | 4 | @foreach ($menu->all() as $value) |
| 5 | - <?php $isGroup = $value instanceof \Malezha\Menu\Contracts\Group; if ($isGroup) $item = $value->getItem(); else $item = $value; ?> |
|
| 5 | + <?php $isGroup = $value instanceof \Malezha\Menu\Contracts\Group; if ($isGroup) { |
|
| 6 | + $item = $value->getItem(); |
|
| 7 | +} else { |
|
| 8 | + $item = $value; |
|
| 9 | +} |
|
| 10 | +?> |
|
| 6 | 11 | @if($item->canDisplay()) |
| 7 | 12 | <li{!! $item->buildAttributes() !!}> |
| 8 | 13 | <a href="{{ $item->getLink()->getUrl() }}"{!! $item->getLink()->buildAttributes() !!}>{!! $item->getLink()->getTitle() !!}</a> |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | * @param string $view |
| 23 | 23 | */ |
| 24 | 24 | function __construct(Container $container, $name, Attributes $attributes, |
| 25 | - Attributes $activeAttributes, $type = self::UL, $view = null); |
|
| 25 | + Attributes $activeAttributes, $type = self::UL, $view = null); |
|
| 26 | 26 | |
| 27 | 27 | /** |
| 28 | 28 | * Make sub menu |