Skip to content

Commit 18f0ce7

Browse files
authored
Register macros on register() to avoid race condition (#262)
1 parent 96c60a7 commit 18f0ce7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/ServiceProvider.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ public function register()
2323
'inertia'
2424
);
2525

26+
$this->registerRequestMacro();
27+
$this->registerRouterMacro();
28+
$this->registerTestingMacros();
29+
2630
$this->app->bind('inertia.testing.view-finder', function ($app) {
2731
return new FileViewFinder(
2832
$app['files'],
@@ -36,9 +40,6 @@ public function boot()
3640
{
3741
$this->registerBladeDirective();
3842
$this->registerConsoleCommands();
39-
$this->registerRequestMacro();
40-
$this->registerRouterMacro();
41-
$this->registerTestingMacros();
4243

4344
$this->publishes([
4445
__DIR__.'/../config/inertia.php' => config_path('inertia.php'),

0 commit comments

Comments
 (0)