All Projects → thedevsaddam → Laravel Schema

thedevsaddam / Laravel Schema

Licence: mit
Display the connected database information from Terminal.

Projects that are alternatives of or similar to Laravel Schema

Laravel Sitemap
Create and generate sitemaps with ease
Stars: ✭ 1,325 (+1252.04%)
Mutual labels:  laravel
Laravel Oh Generators
This package extends the core file generators that are included with Laravel 5 or later.
Stars: ✭ 96 (-2.04%)
Mutual labels:  laravel
Laraestimate
LaraEstimate is a complete Estimates/Quotes System made with Laravel 7 and VueJS.
Stars: ✭ 98 (+0%)
Mutual labels:  laravel
Laravel Create
Create Laravel projects really fast
Stars: ✭ 1,331 (+1258.16%)
Mutual labels:  laravel
Laravel piwik
An Interface to Piwik's Analytics API for Laravel (Composer Package).
Stars: ✭ 95 (-3.06%)
Mutual labels:  laravel
Thumbnail
Thumbnail for a given video using FFMpeg
Stars: ✭ 96 (-2.04%)
Mutual labels:  laravel
Admin One Laravel Dashboard
Admin One — Free Laravel Dashboard (Bulma Buefy Vue.js SPA)
Stars: ✭ 94 (-4.08%)
Mutual labels:  laravel
Elasticsearch
Use SQL statements to query elasticsearch
Stars: ✭ 98 (+0%)
Mutual labels:  laravel
Lara Lens
Laravel package for display diagnostic (config, database, http connections...)
Stars: ✭ 96 (-2.04%)
Mutual labels:  laravel
All In One Schemaorg Rich Snippets
WordPress Plugin that Boost CTR. Improve SEO & Rankings. Supports most of the content type. Works perfectly with Google, Bing, Yahoo & Facebook.
Stars: ✭ 97 (-1.02%)
Mutual labels:  schema
Api Restful Con Laravel Guia Definitiva
Repositorio para el código base del curso "API RESTful con Laravel - Guía Definitiva"
Stars: ✭ 95 (-3.06%)
Mutual labels:  laravel
Flex Env
🌳 Manage your .env file in Laravel projects through artisan
Stars: ✭ 95 (-3.06%)
Mutual labels:  laravel
Laravel Migrations Organiser
A Laravel package to help organise migrations
Stars: ✭ 96 (-2.04%)
Mutual labels:  laravel
Laravel Single Session
This package prevents a User from being logged in more than once. It destroys the previous session when a User logs in and thereby allowing only one session per user.
Stars: ✭ 95 (-3.06%)
Mutual labels:  laravel
Laranuxt
Laravel and Nuxt.js boilerplate
Stars: ✭ 98 (+0%)
Mutual labels:  laravel
Laravel Email Confirmation
Add email confimation to Laravel project
Stars: ✭ 94 (-4.08%)
Mutual labels:  laravel
Laravel Tracer
Shows the path of each blade file loaded in a template
Stars: ✭ 96 (-2.04%)
Mutual labels:  laravel
Pilothouse
A command line app for managing a LEMP local development environment based on Docker.
Stars: ✭ 98 (+0%)
Mutual labels:  laravel
Leacmf Laravel
leacmf是一款基于laravel5.7+layui的极速后台和api开发框架。
Stars: ✭ 98 (+0%)
Mutual labels:  laravel
Laravel Google Translate
This package makes using the Google Translate API in your laravel app a breeze with minimum to no configuration, clean syntax and a consistent package API.
Stars: ✭ 97 (-1.02%)
Mutual labels:  laravel

Laravel Schema

This package will help to display database schema information from terminal.


Installation

Via Composer

$ composer require thedevsaddam/laravel-schema

Install manually (add the line to composer.json file)

"thedevsaddam/laravel-schema": "^2.0"

Then open your terminal and hit the command

composer update

Add the following line to config/app.php file's providers array

Thedevsaddam\LaravelSchema\LaravelSchemaServiceProvider::class,

For lumen open bootstrap/app.php and add the line below

$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

 php artisan schema:show

Example output: Schema information in tabular form

Schema information in tabular form

If you want to see a specific table then pass table name or Namespace\\Model

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

database info commandline

Note: Same condition will be applied for tables list view

Show Schema information in List

 php artisan schema:list

Example output: Schema information in list

database info commandline

Avaliable Options in show and list:

  • --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

 php artisan schema:simple

Example output: Tables name with rows count

Tables name with rows count

Note: You may pass --c=connectionName or -c connectionName to display a specific connection schema info

Show table definition

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

Example output: Table definition with default page and limit

Table definition with default page and limit

Avaliable Options in table:

  • --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

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

Example output: Query result will be dumped in console

Query result will be dumped in console

Avaliable Options in query:

  • --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

 php artisan schema:monitor

Example output: Showing the database status

Schema information in tabular form

You can pass --i=integerNumber as refresh time interval and --c=ConnectionName as well

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

License

The laravel-schema is a open-source software licensed under the MIT License.

Thank you :)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].