Skip to content

Commit

Permalink
fix url replacement
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Feb 8, 2022
1 parent 6fcfcec commit 5af95ec
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Console/InstallsApiStack.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,9 @@ protected function installApiStack()
copy(base_path('.env.example'), base_path('.env'));
}

$this->replaceInFile(
'APP_URL=http://localhost',
'APP_URL=http://localhost'.PHP_EOL.'FRONTEND_URL=http://localhost:3000',
base_path('.env')
file_put_contents(
base_path('.env'),
preg_replace('/APP_URL=(.*)/', 'APP_URL=http://localhost:8000'.PHP_EOL.'FRONTEND_URL=http://localhost:3000', file_get_contents(base_path('.env')))
);

// Tests...
Expand Down

0 comments on commit 5af95ec

Please sign in to comment.