PHP code example of arpanpatoliya / db-backup

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

    

arpanpatoliya / db-backup example snippets


composer test
bash
php artisan vendor:publish --provider="Arpanpatoliya\DBBackup\DBBackupServiceProvider"

base
config/dbbackup.php
base
use Arpanpatoliya\DbBackup\Backup;

public function triggerBackupDirectly()
{
    $backup = new Backup();
    $success = $backup->run();

    $success = json_decode($success, true);
    return response()->json($success);
}

base
php artisan db-backup:run