Skip to content

Commit 797987c

Browse files
committed
chore(config): define default populated items
1 parent 3cf2b47 commit 797987c

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

config/laravel-menu-wrapper.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
3+
use Illuminate\Routing\Route;
4+
5+
return [
6+
/**
7+
* ----------------------------------------------------------------------
8+
* Determine the grouping method that will be used to group your menus
9+
* this configuration will applied only if you give the group label
10+
* on menu(). Refer to the README.md for more information
11+
* ----------------------------------------------------------------------
12+
* Possible value: key, item
13+
*/
14+
'group_as' => 'key',
15+
16+
'populate_items' => function (Route $route) {
17+
return [
18+
'route_name' => $route->getName(),
19+
'uri' => $route->uri(),
20+
'method' => $route->getActionMethod(),
21+
];
22+
}
23+
];

0 commit comments

Comments
 (0)