diff --git a/src/Console/InstallsReactorCommand.php b/src/Console/InstallsReactorCommand.php index ac27fe4..b65fc5d 100644 --- a/src/Console/InstallsReactorCommand.php +++ b/src/Console/InstallsReactorCommand.php @@ -50,6 +50,9 @@ protected function installInertiaReact() $this->installMiddlewareAfter('SubstituteBindings::class', '\App\Http\Middleware\HandleInertiaRequests::class'); $this->installMiddlewareAfter('\App\Http\Middleware\HandleInertiaRequests::class', '\Illuminate\Http\Middleware\AddLinkHeadersForPreloadedAssets::class'); + // Providers... + copy(__DIR__.'/../../stubs/inertia-react/app/Providers/AppServiceProvider.php', app_path('Providers/AppServiceProvider.php')); + copy(__DIR__.'/../../stubs/inertia-react/app/Http/Middleware/HandleInertiaRequests.php', app_path('Http/Middleware/HandleInertiaRequests.php')); // Views... diff --git a/stubs/inertia-react/app/Providers/AppServiceProvider.php b/stubs/inertia-react/app/Providers/AppServiceProvider.php new file mode 100644 index 0000000..bea9d34 --- /dev/null +++ b/stubs/inertia-react/app/Providers/AppServiceProvider.php @@ -0,0 +1,27 @@ +app->isProduction()); + Model::preventAccessingMissingAttributes(); + Model::preventSilentlyDiscardingAttributes(); + } +}