Creating Sub Menu under Admin panel
-
I have created a package "contact" and want to create a menu in admin panel. The menu has been created but sub menu is not showing.
To create a sub menu I have added a array on src/Config/admin-menu.php
return [ [ 'key' => 'contact', 'name' => 'Contact', 'route' => 'contact.admin.index', 'sort' => 2, 'icon-class' => 'dashboard-icon', ], [ 'key' => 'contact.message', 'name' => 'Contact Messages', 'route' =>'contact.admin.index', 'sort' => 1, 'icon-class' => '', ], [ 'key' => 'contact.address', 'name' => 'Manage Address', 'route' =>'contact.admin.index', 'sort' => 2, 'icon-class' => '', ] ];
But on admin panel only Contact menu has been created no sub menu is showing.
Please Help..
Thanking You in advance.
-
Hi @himanshu-kmr,
Just run
php artisan config:cache
. -
@devansh-webkul said in Creating Sub Menu under Admin panel:
php artisan config:cache
@devansh-webkul Thankyou for your advice. I have cleared the cache but still sub menu not appearing....
-
The third route should be different. And make sure whenever you change the menu and sub-menu. Just run the command
php artisan config:cache
.