Skip to content

Commit 1e2a985

Browse files
committed
Use right register/boot ordering
1 parent 82538d1 commit 1e2a985

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/OpenApiServiceProvider.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,6 @@
2020

2121
class OpenApiServiceProvider extends ServiceProvider
2222
{
23-
public function boot(): void
24-
{
25-
if ($this->app->runningInConsole()) {
26-
$this->publishes([
27-
__DIR__.'/../config/openapi.php' => config_path('openapi.php'),
28-
], 'openapi-config');
29-
}
30-
31-
$this->loadRoutesFrom(__DIR__.'/../routes/api.php');
32-
}
33-
3423
public function register(): void
3524
{
3625
$this->mergeConfigFrom(
@@ -88,6 +77,17 @@ public function register(): void
8877
}
8978
}
9079

80+
public function boot(): void
81+
{
82+
if ($this->app->runningInConsole()) {
83+
$this->publishes([
84+
__DIR__.'/../config/openapi.php' => config_path('openapi.php'),
85+
], 'openapi-config');
86+
}
87+
88+
$this->loadRoutesFrom(__DIR__.'/../routes/api.php');
89+
}
90+
9191
private function getPathsFromConfig(string $type): array
9292
{
9393
$directories = config('openapi.locations.'.$type, []);

0 commit comments

Comments
 (0)