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