1. Go to this page and download the library: Download omenejoseph/dynamic-env 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/ */
omenejoseph / dynamic-env example snippets
return [
/* Secret manager */
'secret_manager' => 'aws',
/* AWS credentials */
'aws_key' => env('AWS_ACCESS_KEY_ID'),
'aws_secret' => env('AWS_SECRET_ACCESS_KEY'),
'aws_secret_region' => env('AWS_SECRET_REGION'),
/* Environments that you would be saving the envs to */
'environments' => [
'local',
'qa',
'production'
],
/* suffix appended to .env when generating the new file eg. .env.sync */
'env-suffix' => 'sync',
];
bash
php artisan sync:env
bash
php artisan populate:env
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.