The Laravel package that provides the Artisan command to execute mysqldump.
ngmy/laravel-mysql-dumper is a Laravel package for the laravel package that provides the artisan command to execute mysqldump..
It currently has 1 GitHub stars and 90.871 downloads on Packagist (latest version 0.4.0).
Install it with composer require ngmy/laravel-mysql-dumper.
Discover more Laravel packages by ngmy
or browse all Laravel packages to compare alternatives.
Last updated
The Laravel package that provides the Artisan command to execute mysqldump.
Laravel MySQL Dumper has the following features:
mysqldump optionsLaravel MySQL Dumper has the following requirements:
Execute the Composer require command:
composer require ngmy/laravel-mysql-dumper
This will update your composer.json file and install this package into the vendor directory.
If you don't use package discovery, add the service provider to the providers array in the config/app.php file:
Ngmy\LaravelMysqlDumper\MysqlDumperServiceProvider::class,
Execute the Artisan vendor:publish command:
php artisan vendor:publish
This will publish the configuration file to the config/ngmy-mysql-dumper.php file.
You can also use the tag to execute the command:
php artisan vendor:publish --tag=ngmy-mysql-dumper
You can also use the service provider to execute the command:
php artisan vendor:publish --provider="Ngmy\LaravelMysqlDumper\MysqlDumperServiceProvider"
php artisan mysql-dumper:dump
php artisan mysql-dumper:dump --setting=schema
php artisan mysql-dumper:dump --setting=data
Add the dump setting to the settings array in the config/ngmy-mysql-dumper.php file.
Then, use the dump setting to execute the command:
php artisan mysql-dumper:dump --setting=your_setting
Use the dump setting with the importalbe_with_laravel option true to execute the command:
php artisan mysql-dumper:dump
Then, use the unprepared method to import the dump file, such as in your migration.
DB::unprepared(file_get_contents($dumpFile));