@@ -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> |
@@ -178,7 +178,7 @@ |
||
178 | 178 | |
179 | 179 | $builder = $this->builderFactory(); |
180 | 180 | $builder->add('index', 'Index Page', url('/')); |
181 | - $builder->group('group', function(Item $item){}, function(Builder $menu) { |
|
181 | + $builder->group('group', function(Item $item) {}, function(Builder $menu) { |
|
182 | 182 | $menu->add('one', 'One', url('/one')); |
183 | 183 | }); |
184 | 184 |
@@ -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 |