@@ -35,11 +35,9 @@ public function configurePackage(Package $package): void
3535
3636 public function packageRegistered ()
3737 {
38- foreach ($ this ->passThrough as $ env ) {
39- ServeCommand::$ passthroughVariables [] = $ env ;
40- }
38+ $ this ->mergeConfigFrom ($ this ->package ->basePath ("/../config/nativephp-internal.php " ), 'nativephp-internal ' );
4139
42- if (config ('nativephp.running ' )) {
40+ if (config ('nativephp-internal .running ' )) {
4341 $ this ->configureApp ();
4442 }
4543 }
@@ -48,22 +46,22 @@ protected function configureApp()
4846 {
4947 $ oldStoragePath = $ this ->app ->storagePath ();
5048
51- $ this ->app ->useStoragePath (config ('nativephp.storage_path ' ));
49+ $ this ->app ->useStoragePath (config ('nativephp-internal .storage_path ' ));
5250
5351 // Patch all config values that contain the old storage path
5452 $ config = Arr::dot (config ()->all ());
5553
5654 foreach ($ config as $ key => $ value ) {
5755 if (is_string ($ value ) && str_contains ($ value , $ oldStoragePath )) {
58- $ newValue = str_replace ($ oldStoragePath , config ('nativephp.storage_path ' ), $ value );
56+ $ newValue = str_replace ($ oldStoragePath , config ('nativephp-internal .storage_path ' ), $ value );
5957 config ([$ key => $ newValue ]);
6058 }
6159 }
6260
6361 config (['database.connections.nativephp ' => [
6462 'driver ' => 'sqlite ' ,
6563 'url ' => env ('DATABASE_URL ' ),
66- 'database ' => config ('nativephp.database_path ' ),
64+ 'database ' => config ('nativephp-internal .database_path ' ),
6765 'prefix ' => '' ,
6866 'foreign_key_constraints ' => env ('DB_FOREIGN_KEYS ' , true ),
6967 ]]);
0 commit comments