Laravel Package for Database management easier.
- Lists all the tables in the database
- Lists all the columns of a table
- Get datatype of a column
- Add in your composer.json
"howlowck/db-manager": "dev-master"
- Add in your
app/config/app.php
service provider:'Howlowck\DbManager\DbManagerServiceProvider'
- (optional) add the facade:
'DbManager' => 'Howlowck\DbManager\Facades\DbManager',
(If you use the Facade: )
-
DbManager::listTables( [optional] $exclude )
-- lists all the tables in your database, $exclude is an array that you want to exclude from the final result (Note: by default, it excludesmigrations
table); -
DbManager::listColumns($table, [optional] $exclude)
-- lists all the columns in the given table. -
DbManager::getColumnType($table, $columnName)
-- returns the type name of a column
(If you choose to only use the service provider)
App::make('dbmanager')->listTables()
...