PHP code example of phattarachai / laravel-env-secrets

1. Go to this page and download the library: Download phattarachai/laravel-env-secrets 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/ */

    

phattarachai / laravel-env-secrets example snippets


// config/env-secrets.php
return [
    'host' => env('ENV_SECRETS_HOST', 'necta'),          // ssh host alias of the deploy box
    'dir'  => env('ENV_SECRETS_DIR', '/etc/nectapharma'), // where key files live on the box
    'slug' => env('ENV_SECRETS_SLUG', null),              // key filename stem; null → app name
];
bash
php artisan vendor:publish --tag=env-secrets-config
bash
php artisan secrets:provision uat
bash
php artisan secrets:provision production --host=prod-box --dir=/etc/myapp --slug=myapp
bash
php artisan secrets:provision uat --local