PHP code example of tusharb / laravel-envcrypt

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

    

tusharb / laravel-envcrypt example snippets

bash
php vendor/tusharb/laravel-envcrypt/bin/envcrypt encrypt-all
php vendor/tusharb/laravel-envcrypt/bin/envcrypt decrypt --key=DB_PASSWORD
bash
php artisan db:key-rotate --dry-run    # proves it would succeed, changes nothing
php artisan db:key-rotate