I have AWS server where we are setting all system environment variables. For reference system environment variables like DATABASE connection, EMAIL CLIENT configurations and some other configuration.
We can read those system variables into PHP file as well as into terminal. But my requirement is to read system variable into .env file of laravel
Following works into PHP but not into .env file
env('VARIABLE_NAME')
getenv('VARIABLE_NAME')
$_ENV['VARIABLE_NAME']
The reason for this is that we are setting system wide environment variable to avoid the secrets being stored in Physical files. And as a solution changing directly into module files each time is not practical solution. Is there any way by which we can Read/Set SYSTEM VARIABLE INTO .env file ??
Anyone any help would highly be appreciated. Thanks