PHP code example of hydrat-agency / laravel-db-dumper
1. Go to this page and download the library: Download hydrat-agency/laravel-db-dumper 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/ */
hydrat-agency / laravel-db-dumper example snippets
# Using instance
$dumper = new Hydrat\LaravelDbDumper\LaravelDbDumper();
$dumper->dumpTo('path/to/file.sql', 'dbname');
$dumper->importFrom('path/to/file.sql');
# Using facade
use Hydrat\LaravelDbDumper\Facades\LaravelDbDumper;
LaravelDbDumper::dumpTo('path/to/file.sql', 'dbname');
LaravelDbDumper::importFrom('path/to/file.sql');
bash
php artisan db:export /path/to/file.sql # full path
php artisan db:export ../dump.sql # relative path