PHPackages                             melihovv/laravel-env-validator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. melihovv/laravel-env-validator

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

melihovv/laravel-env-validator
==============================

Laravel Validator for the .env file

7.0.2(5y ago)1639.7k41MITPHPPHP &gt;=7.2

Since Jan 31Pushed 4y ago1 watchersCompare

[ Source](https://github.com/melihovv/laravel-env-validator)[ Packagist](https://packagist.org/packages/melihovv/laravel-env-validator)[ RSS](/packages/melihovv-laravel-env-validator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (9)Dependencies (6)Versions (15)Used By (1)

Laravel Env Validator
=====================

[](#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://camo.githubusercontent.com/94ae14314b62f14b057a652ff1205aef07f3c9c4ab514e790eb872f586450b0b/68747470733a2f2f7374796c6563692e696f2f7265706f732f37383034313637382f736869656c64)](https://styleci.io/repos/78041678)

[![Packagist](https://camo.githubusercontent.com/81d2d5b11b771a6a73bfd9c092c020e4c1034bf2489b886c6908e9ef272f378f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d656c69686f76762f6c61726176656c2d656e762d76616c696461746f722e737667)](https://packagist.org/packages/melihovv/laravel-env-validator)[![Packagist](https://camo.githubusercontent.com/28db0fac5bbfc250219dd19f063a065ad0f3cd16764e8e382f008a1dfe2a8a6a/68747470733a2f2f706f7365722e707567782e6f72672f6d656c69686f76762f6c61726176656c2d656e762d76616c696461746f722f642f746f74616c2e737667)](https://packagist.org/packages/melihovv/laravel-env-validator)[![Packagist](https://camo.githubusercontent.com/8db36cffb628ba1f141067f65c3260818749f6e61ad5fe9d925efb5263b58501/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6d656c69686f76762f6c61726176656c2d656e762d76616c696461746f722e737667)](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

[](#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
------------

[](#installation)

Install via composer

```
composer require melihovv/laravel-env-validator

```

### Publish configuration file

[](#publish-configuration-file)

```
php artisan vendor:publish --provider="Melihovv\LaravelEnvValidator\ServiceProvider" --tag="config"

```

Example configuration file
--------------------------

[](#example-configuration-file)

```
// config/env-validator.php
