https://github.com/romanzipp/laravel-env-diff
Create a visual Diff of multiple .env files
https://github.com/romanzipp/laravel-env-diff
laravel php php7 showcase
Last synced: 4 months ago
JSON representation
Create a visual Diff of multiple .env files
- Host: GitHub
- URL: https://github.com/romanzipp/laravel-env-diff
- Owner: romanzipp
- License: mit
- Created: 2018-08-14T21:31:14.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-02-15T12:40:00.000Z (over 2 years ago)
- Last Synced: 2025-03-16T17:26:21.824Z (4 months ago)
- Topics: laravel, php, php7, showcase
- Language: PHP
- Homepage: https://packagist.org/packages/romanzipp/laravel-env-diff
- Size: 199 KB
- Stars: 6
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# Laravel Env Diff
[](https://packagist.org/packages/romanzipp/laravel-env-diff)
[](https://packagist.org/packages/romanzipp/laravel-env-diff)
[](https://packagist.org/packages/romanzipp/laravel-env-diff)
[](https://github.com/romanzipp/Laravel-Env-Diff/actions)Create a visual Diff of .env and .env.example files
## Installation
```
composer require romanzipp/laravel-env-diff
```**If you use Laravel 5.5+ you are already done, otherwise continue.**
Add Service Provider to your `app.php` configuration file:
```php
romanzipp\EnvDiff\Providers\EnvDiffProvider::class,
```## Configuration
Copy configuration to config folder:
```
$ php artisan vendor:publish --provider="romanzipp\EnvDiff\Providers\EnvDiffProvider"
``````php
return [
/*
* Specify all environment files that should be compared.
*/
'files' => [
'.env',
'.env.example',
],/*
* The base path to look for environment files.
*/
'path' => base_path(),/*
* User colors when printing console output.
*/
'use_colors' => true,/*
* Hide variables that exist in all .env files.
*/
'hide_existing' => true,/*
* Show existing env values instead of y/n.
*/
'show_values' => false,
];
```## Usage
```
$ php artisan env:diff
{files? : Specify environment files, overriding config}
{--values : Display existing environment values}';
```## Example
```
$ php artisan env:diff .env,.env.second
```
```
$ php artisan env:diff .env,.env.second --values
```
## Testing
```shell
./vendor/bin/phpunit
```