File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 361361 */
362362 'enable_menu_search ' => true ,
363363
364+ /*
365+ |--------------------------------------------------------------------------
366+ | Exclude route from generate menu command
367+ |--------------------------------------------------------------------------
368+ */
369+ 'menu_exclude ' => [
370+ '_handle_selectable_ ' ,
371+ '_handle_renderable_ ' ,
372+ ],
373+
364374 /*
365375 |--------------------------------------------------------------------------
366376 | Alert message that will displayed on top of the page.
Original file line number Diff line number Diff line change @@ -55,7 +55,8 @@ public function handle()
5555 && !Str::startsWith ($ uri , 'admin/auth/ ' )
5656 && !Str::endsWith ($ uri , '/create ' )
5757 && !Str::contains ($ uri , '{ ' )
58- && in_array ('GET ' , $ route ->methods ());
58+ && in_array ('GET ' , $ route ->methods ())
59+ && !in_array (substr ($ route ->uri (), strlen ('admin/ ' )), config ('admin.menu_exclude ' ));
5960 })
6061 ->map (function (Route $ route ) {
6162 $ uri = substr ($ route ->uri (), strlen ('admin/ ' ));
You can’t perform that action at this time.
0 commit comments