PHP code example of cleaniquecoders / laravel-config-backup

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

    

cleaniquecoders / laravel-config-backup example snippets


use CleaniqueCoders\ConfigBackup\Facades\ConfigBackup;

$backup = ConfigBackup::create(['env', 'database'], 'a-strong-password');
$result = ConfigBackup::restore($absPath, 'a-strong-password', ['env', 'database']);
bash
# Create a backup (prompts for the encryption password securely)
php artisan config-backup:create --sections=env,database --notes="before upgrade"

# List, preview a restore, then restore
php artisan config-backup:list
php artisan config-backup:restore {uuid} --dry-run
php artisan config-backup:restore {uuid}