I am storing my email config in the .env file, because it contains secret credentials.
I am also storing non-secret stuff like EMAIL_ADDRESS_NO_REPLY in .enc to keep the stuff together.
In my notifications, I currently use
->from(env('EMAIL_ADDRESS_NO_REPLY','[email protected]');
to set the sender address on outbound emails.
However, https://laravel.com/docs/5.6/deployment say I should not use env() in code, only in config files:
"be sure that you are only calling the env function from within your configuration files."
In the configuration doucmentation (https://laravel.com/docs/5.6/configuration) it says
"All of the configuration files for the Laravel framework are stored in the config directory."
but the .env file is in the application's root not the config.
The config helper documentation says it can be "accessed using "dot" syntax, which includes the name of the file and the option you wish to access."
What do I use for 'the name of the file' in to retrieve a value from .env - a file NOT in the confi folder? Or is the 'single file' created by this caching still accessible using env()?