PHP code example of romanzipp / laravel-env-diff

1. Go to this page and download the library: Download romanzipp/laravel-env-diff library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

romanzipp / laravel-env-diff example snippets


romanzipp\EnvDiff\Providers\EnvDiffProvider::class,

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,
];

$ php artisan vendor:publish --provider="romanzipp\EnvDiff\Providers\EnvDiffProvider"

$ php artisan env:diff
              {files? : Specify environment files, overriding config}
              {--values : Display existing environment values}';