Download the PHP package msztorc/laravel-env without Composer
On this page you can find all versions of the php package msztorc/laravel-env. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download msztorc/laravel-env
More information about msztorc/laravel-env
Files in msztorc/laravel-env
Package laravel-env
Short Description Laravel env helper commands
License MIT
Homepage https://github.com/msztorc/laravel-env
Informations about the package laravel-env
Laravel-Env
Managing environment variables programmatically and from the command line (by the artisan)
- Installation
- Usage
- API Reference
- Contributing
- Credits
- License
Installation
You can install the package via composer:
Usage
env:get
- Getting environment variable value
CLI by Artisan
php artisan env:get VAR_KEY
Get value only
Get key-value
Get key-value as JSON output
Print all env variables as JSON output
Programmatically
env:set
- Setting environment variable value
CLI by Artisan
php artisan env:set KEY VALUE
or php artisan env:set KEY=VALUE
or php artisan env:set KEY "VALUE WITH SPACES"
Set value variants
Setting a value containing spaces
Programmatically
env:del
- Deleting environment variable
CLI by Artisan
php artisan env:del VAR_KEY
Programmatically
env:list
- List all environments variables
Print all env variables as JSON output
Testing
API Reference
Methods
Check if the variable exists
Params
string $key Environment variable key
Get the current env variable value
Params
string $key Environment variable key
Get env key-value
Params
string $key Environment variable key
Set env variable value
Params
string $key Environment variable key string $value Variable value bool $write Write changes to .env file (default=true)
Delete environment variable
Params
string $key Environment variable key bool $write Write changes to .env file (default=true)
Get all env variables from memory
Get current env entire config from memory
Write env config to file
Check if the changes has been saved
Check if there were any env content changes
Contributing
Please see CONTRIBUTING for details.
Credits
- Miroslaw Sztorc
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-env with dependencies
illuminate/support Version ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0 || ^11.0
ext-json Version *