PHP code example of zarulizham / laravel-database-backup-scheduler

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

    

zarulizham / laravel-database-backup-scheduler example snippets


return [
    'connections' => [
        'mysql' => [
            'excludeTables' => [],
            'storage' => env('FILESYSTEM_DISK', 'local'),
        ],
    ],
];

$schedule->command('db:backup')->dailyAt('00:00')
    ->environments('production');

$schedule->command('db:backup:prune')->dailyAt('00:00')
    ->environments('production');
bash
php artisan vendor:publish --tag="database-backup-scheduler-migrations"
php artisan migrate
bash
php artisan vendor:publish --tag="medialibrary-config"
php artisan vendor:publish --tag="medialibrary-migrations"
php artisan migrate
bash
php artisan vendor:publish --tag="database-backup-scheduler-config"