PHP code example of a2design-inc / laravel-db-backup

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

    

a2design-inc / laravel-db-backup example snippets


'providers' => [
    ...
    /*
     * Package Service Providers...
     */
    A2design\DbBackup\DbBackupServiceProvider::class,
    ...
],

// app/Console/Kernel.php

protected function schedule(Schedule $schedule)
{
   $schedule->command('db:backup')->daily()->at('00:00');
}
 bash
php artisan db:backup
 bash
php artisan db:backups-list
 bash
php artisan db:restore
 bash
php artisan db:restore 2017-12-17.sql[.gz]