@@ 144-151 (lines=8) @@ | ||
141 | $link->setTitle('Orders'); |
|
142 | $link->setUrl('javascript:;'); |
|
143 | ||
144 | }, function(Builder $menu) { |
|
145 | $menu->create('all', 'All', url('/orders/all')); |
|
146 | $menu->create('type_1', 'Type 1', url('/orders/1'), [], ['class' => 'text-color-red']); |
|
147 | ||
148 | $menu->create('type_2', 'Type 2', url('/orders/2'), [], [], function(Item $item) { |
|
149 | $item->getLink()->getAttributes()->push(['data-attribute' => 'value']); |
|
150 | }); |
|
151 | }); |
|
152 | ||
153 | $html = $builder->render(); |
|
154 | $file = file_get_contents(__DIR__ . '/stub/menu.html'); |
@@ 30-37 (lines=8) @@ | ||
27 | $link = $item->getLink(); |
|
28 | $link->setTitle('Orders'); |
|
29 | $link->setUrl('javascript:;'); |
|
30 | }, function(Builder $menu) { |
|
31 | $menu->create('all', 'All', url('/orders/all')); |
|
32 | $menu->create('type_1', 'Type 1', url('/orders/1'), [], ['class' => 'text-color-red']); |
|
33 | ||
34 | $menu->create('type_2', 'Type 2', url('/orders/2'), [], [], function(Item $item) { |
|
35 | $item->getLink()->getAttributes()->push(['data-attribute' => 'value']); |
|
36 | }); |
|
37 | }); |
|
38 | ||
39 | return $builder; |
|
40 | } |