DB Console
DB Console is a database console with support for Mysql, Sqlite, Mongodb and Redis., (*1)
Screenshots
Mysql:, (*2)
, (*3)
MongoDB:, (*4)
, (*5)
Redis:, (*6)
, (*7)
Installation
composer require encore/dbconsole --dev
Configuration
See database.php., (*8)
Usage
<?php
require __DIR__ . '/vendor/autoload.php';
use Encore\Dbconsole\Shell;
$shell = new Shell(__DIR__ . '/config/database.php');
// Also you can specify a connection which in your configuration.
//$shell->setConnection('redis');
$shell->run();
And run this script in your console., (*9)
Work with Laravel
When use in Laravel, it will use the database configuration in application., (*10)
Add service provider to config/app.php in providers section:, (*11)
Encore\Dbconsole\Providers\LaravelServiceProvider::class
then run DB Console with:, (*12)
php artisan db:console