https://github.com/melihovv/laravel-env-validator
Laravel .env validator
https://github.com/melihovv/laravel-env-validator
env-validator environment-variables laravel laravel-validation php
Last synced: about 1 year ago
JSON representation
Laravel .env validator
- Host: GitHub
- URL: https://github.com/melihovv/laravel-env-validator
- Owner: melihovv
- License: mit
- Created: 2017-01-31T13:56:00.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2022-03-11T14:18:19.000Z (over 4 years ago)
- Last Synced: 2025-04-13T00:35:34.660Z (about 1 year ago)
- Topics: env-validator, environment-variables, laravel, laravel-validation, php
- Language: PHP
- Homepage:
- Size: 51.8 KB
- Stars: 16
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Laravel Env Validator
=====================
[](https://github.com/melihovv/laravel-env-validator/actions)
[](https://styleci.io/repos/78041678)
[](https://packagist.org/packages/melihovv/laravel-env-validator)
[](https://packagist.org/packages/melihovv/laravel-env-validator)
[](https://packagist.org/packages/melihovv/laravel-env-validator)
Laravel Env Validator is meant to validate your .env file in order to avoid any
unexpected behaviour for not having properly defined some variable or value.
### Highlights
- Make sure you don't go live without all required .env variables and without the correct values
- Validate you env variables using the Laravel Validator by simple defining rules in a configuration file
- Working in teams becomes easier
## Installation
Install via composer
```
composer require melihovv/laravel-env-validator
```
### Publish configuration file
```
php artisan vendor:publish --provider="Melihovv\LaravelEnvValidator\ServiceProvider" --tag="config"
```
## Example configuration file
```php
// config/env-validator.php
[
'APP_NAME' => 'required|string',
'APP_ENV' => 'in:local,production',
],
];
```
## Usage
Simply run following command
```
php artisan config:env-validator
```
## Security
If you discover any security related issues, please email amelihovv@ya.ru instead of using the issue tracker.
## Credits
- [Alexander Melihov](https://github.com/melihovv)
- [Mathias Grimm](https://github.com/mathiasgrimm)
- [David Stroker](https://github.com/davidstoker)
- [All contributors](https://github.com/melihovv/laravel-env-validator/graphs/contributors)