Download the PHP package bestuniverse/laravel-toolkit without Composer
On this page you can find all versions of the php package bestuniverse/laravel-toolkit. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bestuniverse/laravel-toolkit
More information about bestuniverse/laravel-toolkit
Files in bestuniverse/laravel-toolkit
Package laravel-toolkit
Short Description MySQL backup and import commands for Laravel applications.
License MIT
Informations about the package laravel-toolkit
Laravel Toolkit
Utilities for Laravel applications that need to create and restore MySQL database backups.
Requirements
- PHP 8.3 or later
- Laravel 12 or 13
- The
mysqldumpandmysqlexecutables available on the systemPATH
Installation
Install the package with Composer:
Laravel discovers the service provider automatically. Publish the configuration when you need to change the backup disk or directory:
This creates config/laravel-toolkit.php:
The configured disk must be defined in your application's config/filesystems.php.
Commands
Create a backup
Create a MySQL backup using the application's mysql database connection:
Backup files are written to the configured disk and directory, for example storage/app/mysql-backup/live_2026_09_01_120000_full.sql when using the local disk.
Import a backup
Import a specific SQL file from the configured backup directory:
When no filename is supplied, the command interactively asks which .sql file to import:
Database connection values are taken from the application's mysql connection. You can override them for an individual import:
Imports are blocked in the production environment unless you explicitly confirm them:
Warning: Importing a SQL backup can overwrite or delete existing database data. Verify the selected file and target database before running the command.
Testing
License
Laravel Toolkit is open-sourced software licensed under the MIT license.