PHP code example of nwidart / db-exporter

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

    

nwidart / db-exporter example snippets


'Nwidart\DbExporter\DbExportHandlerServiceProvider'


Route::get('export', function()
{
    DbExportHandler::migrate();
});


Route::get('export', function()
{
    DbExportHandler::migrate('otherDatabaseName');
});


Route::get('exportSeed', function()
{
    DbExportHandler::seed();
});


$this->call('nameOfYourSeedClass');



DbExportHandler::migrate()->seed();



DbExportHandler::migrateAndSeed();



DbExportHandler::ignore('tableToIgnore')->migrate();
DbExportHandler::ignore('tableToIgnore')->seed();


php artisan config:publish nwidart/db-exporter

php artisan dbe:migrations

php artisan dbe:migrations otherDatabaseName

php artisan dbe:migrations --ignore="table1,table2"

php artisan dbe:seeds

php artisan dbe:remote production --migrations

php artisan dbe:remote production --seeds

php artisan dbe:remote production --migrations --seeds