diff --git a/src/ServiceProvider.php b/src/ServiceProvider.php
index d9d82b7..61f264e 100644
--- a/src/ServiceProvider.php
+++ b/src/ServiceProvider.php
@@ -17,16 +17,19 @@ public function __construct($app)
$this->laravelPackageProviders = [
\App\Providers\HorizonServiceProvider::class => [
'name' => 'horizon',
- 'url' => '/'.trim(config('horizon.path'), '/'),
+ 'icon' => '',
+ 'url' => '/'.trim(config('horizon.path'), '/'),
],
\App\Providers\NovaServiceProvider::class => [
'name' => 'nova',
- 'url' => '/'.trim(config('nova.path'), '/'),
+ 'icon' => '',
+ 'url' => '/'.trim(config('nova.path'), '/'),
],
// 'spark',
\App\Providers\TelescopeServiceProvider::class => [
'name' => 'telescope',
- 'url' => '/'.trim(config('telescope.path'), '/'),
+ 'icon' => '',
+ 'url' => '/'.trim(config('telescope.path'), '/'),
],
];
@@ -43,20 +46,16 @@ public function boot()
protected function bootNavigation(): void
{
Nav::extend(function ($nav) {
- $children = [];
-
foreach ($this->laravelPackageProviders() as $provider => $value) {
if ($this->providerExists($provider) && $this->userHasPermission($value['name'])) {
if ($value['url'] !== '/') {
- $children[] = $nav->item(Str::ucfirst($value['name']))->url($value['url']);
+ $nav->create(Str::ucfirst($value['name']))
+ ->icon($value['icon'])
+ ->section('Laravel')
+ ->url($value['url']);
}
}
}
-
- $nav->create('Laravel')
- ->icon('charts')
- ->section('Tools')
- ->children($children);
});
}