PHP code example of tomshaw / laravel-database-export

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

    

tomshaw / laravel-database-export example snippets


Schedule::command('db:export', ['--isolated' => true])->daily();

'options' => [
    'mysql' => ['--single-transaction', '--routines', '--triggers', '--no-tablespaces'],
],
bash
php artisan vendor:publish --tag=database-export-config
bash
php artisan db:export
bash
php artisan db:export --connection=pgsql
bash
php artisan db:export --password=yourpassword