The Laravel Env Keys Checker package checks if all keys are available across all environment (.env) files. This is useful if you have multiple .env files and want to ensure that all .envs have all the values expected.
For example, let’s say you’re working on a feature that adds a configuration value to your local .env file. Typically, you would need that value set in a new installation, thus, would add it to the .env.example file:
Running the env:keys-check Artisan command
If another developer updates the .env.example file, you can also run this command to ensure that your local .env file has any new values added.
Features
Check if all the keys are available across all the .env files.
Add the missing keys to the .env files automatically (configurable) considering the line numbers and empty lines.
Check if the .env and other provided files are present in .gitignore, so that they are not committed to git by mistake.
Sync all the available keys by line across all the .env files. Referencing the master .env file. (Configurable, default is .env)
You can learn more about this package, get full installation instructions, and view the source code on GitHub.
The post Check Env Variables Across All .env Files appeared first on Laravel News.
Join the Laravel Newsletter to get all the latest
Laravel articles like this directly in your inbox.
Source: Read MoreÂ