2017 © Pedro Peláez
 

package laravel-schema

Display the connected database information in console.

image

thedevsaddam/laravel-schema

Display the connected database information in console.

  • Friday, October 28, 2016
  • by thedevsaddam
  • Repository
  • 3 Watchers
  • 98 Stars
  • 4,109 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 7 Forks
  • 2 Open issues
  • 13 Versions
  • 23 % Grown

The README.md

Laravel Schema

This package will help to display database schema information from terminal., (*1)


Installation

Via Composer, (*2)

``` bash $ composer require thedevsaddam/laravel-schema, (*3)

Install manually (add the line to composer.json file)
``` bash
"thedevsaddam/laravel-schema": "^2.0"

Then open your terminal and hit the command, (*4)

composer update

Add the following line to config/app.php file's providers array, (*5)

Thedevsaddam\LaravelSchema\LaravelSchemaServiceProvider::class,

For lumen open bootstrap/app.php and add the line below, (*6)

$app->register(Thedevsaddam\LaravelSchema\LaravelSchemaServiceProvider::class);

Available commands / Features

  1. php artisan schema:help Display the available commands and usages.
  2. php artisan schema:simple Display overall tables with total rows count.
  3. php artisan schema:list Display all the available tables. schema information in list (_please see details below_).
  4. php artisan schema:show Display all the available tables schema information in tabular form (_please see details below_).
  5. php artisan schema:table --t=yourTableName or --t=Namespace\\Model Display a table's paginated data (_please see details below_).
  6. php artisan schema:query --r="wirte your raw sql query in double quote" Perform a sql query.
  7. php artisan schema:monitor Display database server status.

Usage in details

Show Schema information in tabular form, (*7)

 php artisan schema:show

Example output: Schema information in tabular form, (*8)

Schema information in tabular form, (*9)

If you want to see a specific table then pass table name or Namespace\\Model, (*10)

 php artisan schema:show --t=tableName or --t=Namespace\\Model

database info commandline, (*11)

Note: Same condition will be applied for tables list view, (*12)

Show Schema information in List, (*13)

 php artisan schema:list

Example output: Schema information in list, (*14)

database info commandline, (*15)

Avaliable Options in show and list:, (*16)

  • --t=tableName or -t tableName to provide table name or Namespace\Model
  • --c=connectionName or -c connectionName to provide connection name

Show Table names and total rows, (*17)

 php artisan schema:simple

Example output: Tables name with rows count, (*18)

Tables name with rows count, (*19)

Note: You may pass --c=connectionName or -c connectionName to display a specific connection schema info, (*20)

Show table definition, (*21)

 php artisan schema:table --t=tableName or --t=Namespace\\Model

Example output: Table definition with default page and limit, (*22)

Table definition with default page and limit, (*23)

Avaliable Options in table:, (*24)

  • --t=tableName or -t tableName to provide table name or Namespace\\Model (e.g: --t=App\\User or --t=users).
  • --p=pageNumber or -p PageNumber to provide current page which you want to see
  • --o=orderBy or -o orderBy to provide orderBy clause against a column (e.g: --o=id:desc or --o=id:asc [default asc]).
  • --l=rowsLimitPerPage or -l rowsLimitPerPage to provide number of rows you want to display (e.g: --l=20).
  • --c=connectionName or -c connectionName to provide connection name
  • --w=widthOfTableCell or -w widthOfTableCell to provide character length of cell to show in tables (numeric [default=10]).
  • --s=columnName to provide the column to display, you can provide comma (,) separated names to display (e.g: --s=name or --s=id,name).
php artisan schema:table --t=countries --p=4 --o=id:desc --l=25

Perform raw sql query, (*25)

 php artisan schema:query --r="your sql query"

Example output: Query result will be dumped in console, (*26)

Query result will be dumped in console, (*27)

Avaliable Options in query:, (*28)

  • --r=yourRawQuery or -r yourRawQuery to provide your raw sql query (e.g: --r="select * from someTable limit 20").
  • --c=connectionName or -c connectionName to provide connection name (e.g: --c=mysql or -c sqlite)

Monitor database server, (*29)

 php artisan schema:monitor

Example output: Showing the database status, (*30)

Schema information in tabular form, (*31)

You can pass --i=integerNumber as refresh time interval and --c=ConnectionName as well, (*32)

 php artisan schema:monitor --i=3 --c=secondaryDatabase

License

The laravel-schema is a open-source software licensed under the MIT License., (*33)

Thank you :), (*34)

The Versions

28/10 2016

dev-master

9999999-dev https://github.com/thedevsaddam/laravel-schema

Display the connected database information in console.

  Sources   Download

MIT

by Saddam Hossain

database laravel schema thedevsaddam laravel-schema laravel-database viewer

28/10 2016

2.0.3

2.0.3.0 https://github.com/thedevsaddam/laravel-schema

Display the connected database information in console.

  Sources   Download

MIT

by Saddam Hossain

database laravel schema thedevsaddam laravel-schema laravel-database viewer

13/10 2016

2.0.2

2.0.2.0 https://github.com/thedevsaddam/laravel-schema

Display the connected database information in console.

  Sources   Download

MIT

by Saddam Hossain

database laravel schema thedevsaddam laravel-schema laravel-database viewer

11/10 2016

2.0.1

2.0.1.0 https://github.com/thedevsaddam/laravel-schema

Display the connected database information in console.

  Sources   Download

MIT

by Saddam Hossain

database laravel schema thedevsaddam laravel-schema laravel-database viewer

19/09 2016

2.0.0

2.0.0.0 https://github.com/thedevsaddam/laravel-schema

Display the connected database information in console.

  Sources   Download

MIT

by Saddam Hossain

database laravel schema thedevsaddam laravel-schema laravel-database viewer

19/09 2016

1.1.2

1.1.2.0 https://github.com/thedevsaddam/laravel-schema

Display the connected database information in console.

  Sources   Download

MIT

by Saddam Hossain

database laravel schema thedevsaddam laravel-schema laravel-database viewer

17/09 2016

1.1.1

1.1.1.0 https://github.com/thedevsaddam/laravel-schema

Display the connected database information in console.

  Sources   Download

MIT

by Saddam Hossain

database laravel schema thedevsaddam laravel-schema laravel-database viewer

07/09 2016

1.1.0

1.1.0.0 https://github.com/thedevsaddam/laravel-schema

Display the connected database information in console.

  Sources   Download

MIT

by Saddam Hossain

database laravel schema thedevsaddam laravel-schema laravel-database viewer

03/09 2016

1.0.4

1.0.4.0 https://github.com/thedevsaddam/laravel-schema

Display the connected database information in console.

  Sources   Download

MIT

by Saddam Hossain

database laravel schema thedevsaddam laravel-schema laravel-database viewer

01/09 2016

1.0.3

1.0.3.0 https://github.com/thedevsaddam/laravel-schema

Display the connected database information in console.

  Sources   Download

MIT

by Saddam Hossain

database laravel schema thedevsaddam laravel-schema laravel-database viewer

01/09 2016

1.0.2

1.0.2.0 https://github.com/thedevsaddam/laravel-schema

Display the connected database information in console.

  Sources   Download

MIT

by Saddam Hossain

database laravel schema thedevsaddam laravel-schema laravel-database viewer

31/08 2016

1.0.1

1.0.1.0 https://github.com/thedevsaddam/laravel-schema

Display the connected database information in console.

  Sources   Download

MIT

by Saddam Hossain

database laravel schema thedevsaddam laravel-schema laravel-database viewer

31/08 2016

1.0.0

1.0.0.0 https://github.com/thedevsaddam/laravel-schema

Display the connected database information in console.

  Sources   Download

MIT

by Saddam Hossain

database laravel schema thedevsaddam laravel-schema laravel-database viewer