Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document Parser enhancements #55

Merged
merged 5 commits into from
Mar 16, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Apply suggestions from code review
  • Loading branch information
LukeTowers committed Mar 16, 2022
commit 70ef059c0b6693bde5277e544ee6cf1e892886f5
10 changes: 5 additions & 5 deletions services-parser.md
Original file line number Diff line number Diff line change
Expand Up @@ -712,14 +712,14 @@ By default, the `.env` file interacted with will be `base_path('.env')`, this ca
Values can be set either one at a time or by passing an array of values to set.

```php
$env = EnvFile::read();
$env = EnvFile::open();
$env->set('FOO', 'bar');
$env->set('BAR', 'foo');
$env->write();

// or

EnvFile::read()->set([
EnvFile::open()->set([
'FOO' => 'bar'
'BAR' => 'foo'
])->write();
Expand All @@ -730,7 +730,7 @@ EnvFile::read()->set([
```php
use Winter\Storm\Config\EnvFile;

$env = EnvFile::read();
$env = EnvFile::open();
$env->set('FOO', 'bar');
$env->write();
```
Expand All @@ -743,7 +743,7 @@ $env->write();
It is also possible to add empty lines into the env file, usually for organizational purposes:

```php
$env = EnvFile::read();
$env = EnvFile::open();
$env->set('FOO', 'bar');
$env->addEmptyLine();
$env->set('BAR', 'foo');
Expand All @@ -766,7 +766,7 @@ By default, calling `$envFile->write()` will write the current state of the `Env
If desired, you can specify a different path to write to as the first argument provided to the `write($path)` method:

```php
EnvFile::read()->set([
EnvFile::open()->set([
'FOO' => 'bar',
])->write('/path/to/.env.alternative');
```
Expand Down