Skip to content

Commit 1213417

Browse files
authored
Merge pull request #3 from sukristyan/dev
chore: add publish config offer
2 parents 07f5d45 + dae6066 commit 1213417

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/CustomRouteProvider.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ public function register(): void
2525
*/
2626
public function boot(): void
2727
{
28+
$this->publishConfig();
29+
2830
Route::macro('groupMenu', function (string $label) {
2931
RegisterMenu::groupping($label);
3032
return $this;
@@ -50,4 +52,15 @@ public function registerConfig()
5052
'laravel-menu-wrapper'
5153
);
5254
}
55+
56+
public function publishConfig()
57+
{
58+
if (!$this->app->runningInConsole()) {
59+
return;
60+
}
61+
62+
$this->publishes([
63+
__DIR__ . '/../config/laravel-menu-wrapper.php' => config_path('laravel-menu-wrapper.php'),
64+
], 'laravel-menu-wrapper');
65+
}
5366
}

0 commit comments

Comments
 (0)