Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,19 @@ EnvKit::set('MAIL_HOST', 'smtp.acme.test'); // atomic · backed-up · audited
$debug = EnvKit::getBool('APP_DEBUG', false); // typed read
```

## Quick start
## Quick start guide and usage

### Getting started

The service provider and facade register themselves through package discovery, and EnvKit edits
your application's `.env` out of the box. Optionally:

1. Publish the config to change the defaults (writes `config/laranail/env-kit.php`):
`php artisan vendor:publish --tag=laranail::env-kit-config`.
2. Point it at another file with the `ENV_KIT_PATH` variable.
3. Verify against the current `.env`: `php artisan laranail::env-kit.doctor`.

### Usage

```php
use Simtabi\Laranail\EnvKit\Headless\Facades\EnvKit;
Expand All @@ -33,6 +45,13 @@ EnvKit::get('MAIL_HOST'); // "smtp.acme.test"
EnvKit::getBool('APP_DEBUG', false); // true / 1 / yes / on → true
```

Target another file per call:

```php
EnvKit::file(base_path('.env.staging'))->set('APP_ENV', 'staging');
EnvKit::on('testing')->get('DB_DATABASE'); // → .env.testing alongside the base file
```

The full walkthrough is in [Programmatic API](docs/tools/programmatic-api.md); everything else is in the [documentation index](#documentation).

## Documentation
Expand Down
2 changes: 1 addition & 1 deletion docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The package works with sensible defaults out of the box. Publish the config only
if you want to change them:

```bash
php artisan vendor:publish --tag=env-kit-config
php artisan vendor:publish --tag=laranail::env-kit-config
```

This writes `config/laranail/env-kit.php`. See [Configuration](configuration.md) for every
Expand Down
Loading