Skip to content

Commit 4f8f2c4

Browse files
committed
Add APP_URL and FRONTEND_URL to .env.example
1 parent ced69d4 commit 4f8f2c4

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/Console/InstallsApiStack.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,13 @@ protected function installApiStack()
5252
copy(base_path('.env.example'), base_path('.env'));
5353
}
5454

55-
file_put_contents(
56-
base_path('.env'),
57-
preg_replace('/APP_URL=(.*)/', 'APP_URL=http://localhost:8000'.PHP_EOL.'FRONTEND_URL=http://localhost:3000', file_get_contents(base_path('.env')))
58-
);
55+
foreach (['.env', '.env.example'] as $envFile) {
56+
$envFilePath = base_path($envFile);
57+
file_put_contents(
58+
$envFilePath,
59+
preg_replace('/APP_URL=(.*)/', 'APP_URL=http://localhost:8000'.PHP_EOL.'FRONTEND_URL=http://localhost:3000', file_get_contents($envFilePath))
60+
);
61+
}
5962

6063
// Tests...
6164
if (! $this->installTests()) {

0 commit comments

Comments
 (0)