File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 10
10
use Illuminate \Routing \Router ;
11
11
use Illuminate \Support \Facades \RateLimiter ;
12
12
use OpenApi \Attributes as OA ;
13
+ use Illuminate \Contracts \Config \Repository as ConfigRepository ;
13
14
14
15
#[OA \Info(
15
16
version: 'v1.0 ' ,
@@ -138,15 +139,21 @@ public function boot(): void
138
139
return Limit::perMinute (60 )->by ($ request ->user ()?->id ?: $ request ->ip ());
139
140
});
140
141
141
- $ this ->routes (function (Router $ router ) {
142
+ /** @var ConfigRepository $configRepository */
143
+ $ configRepository = $ this ->app ->get (ConfigRepository::class);
144
+
145
+ $ this ->routes (function (Router $ router ) use ($ configRepository ) {
142
146
$ router ->middleware ('api ' )
147
+ ->domain ($ configRepository ->get ('app.domain ' ))
143
148
->group (base_path ('routes/api.php ' ));
144
149
145
150
$ router ->middleware ('api ' )
146
151
->prefix ('v1 ' )
152
+ ->domain ($ configRepository ->get ('app.domain ' ))
147
153
->group (base_path ('routes/api/v1.php ' ));
148
154
149
155
$ router ->middleware ('web ' )
156
+ ->domain ($ configRepository ->get ('app.domain ' ))
150
157
->group (base_path ('routes/web.php ' ));
151
158
});
152
159
}
You can’t perform that action at this time.
0 commit comments