Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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 month 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 (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2022-03-11T14:18:19.000Z (almost 3 years ago)
- Last Synced: 2023-12-19T17:09:50.692Z (about 1 year ago)
- Topics: env-validator, environment-variables, laravel, laravel-validation, php
- Language: PHP
- Homepage:
- Size: 51.8 KB
- Stars: 15
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Laravel Env Validator
=====================[![GitHub Workflow Status](https://github.com/melihovv/laravel-env-validator/workflows/Run%20tests/badge.svg)](https://github.com/melihovv/laravel-env-validator/actions)
[![styleci](https://styleci.io/repos/78041678/shield)](https://styleci.io/repos/78041678)[![Packagist](https://img.shields.io/packagist/v/melihovv/laravel-env-validator.svg)](https://packagist.org/packages/melihovv/laravel-env-validator)
[![Packagist](https://poser.pugx.org/melihovv/laravel-env-validator/d/total.svg)](https://packagist.org/packages/melihovv/laravel-env-validator)
[![Packagist](https://img.shields.io/packagist/l/melihovv/laravel-env-validator.svg)](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 [email protected] 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)