Fork me on GitHub
Kansas City Public Television /

KCPT Laravel MySQL Tools

This package adds 3 simple commands to Laravel's Artisan command line.
The Dump/Import commands only work with MySQL or MariaDB.

Installation

  1. composer require kcpt/mysqltools
  2. Edit config/app.php and add KCPT\MySQLToolsServiceProvider::class, to your 'providers' array.
  3. run artisan commands


Usage

artisan db:clear

Database Clear Command
This command deletes all tables in the current database.

artisan db:dump

Database Dump Command
This command will automatically create a SQL dump file in the current projects folder.
This file is named: db-[environment name]-[today's date].sql

artisan db:import

Database Import Autocomplete
This command imports a database from a .sql file. This command has auto complete so you can press the first letter or two and then arrow through all possibilities.
Database Imported