LaravelPackages.net
Acme Inc.
Toggle sidebar
nickcousins/schemaview-laravel

A simple Artisan command to view the schema of any Eloquent model

253
49
v0.2.3
About nickcousins/schemaview-laravel

nickcousins/schemaview-laravel is a Laravel package for a simple artisan command to view the schema of any eloquent model. It currently has 49 GitHub stars and 253 downloads on Packagist (latest version v0.2.3). Install it with composer require nickcousins/schemaview-laravel. Discover more Laravel packages by nickcousins or browse all Laravel packages to compare alternatives.

Last updated

SchemaViewLaravel

A simple artisan command to view the Schema of an Eloquent model

##Installation

  1. Composer Require: nickcousins/schemaview-laravel
  2. Add the following line to your config/app.php service providers: nickcousins\schemaview\SchemaViewServiceProvider::class,

##Usage

Run the command php artisan schema {model} to view the schema of your chosen model

e.g. php artisan schema User to use the default application namespace

e.g. php artisan schema AnotherNamespace\\Class to specify the namespace

##Sample Output

Schema for Model: App\User
Table: users
 +----------------+------------------+------+-----+---------+----------------+
 | Field          | Type             | Null | Key | Default | Extra          |
 +----------------+------------------+------+-----+---------+----------------+
 | id             | int(10) unsigned | NO   | PRI |         | auto_increment |
 | name           | varchar(255)     | NO   |     |         |                |
 | email          | varchar(255)     | NO   | UNI |         |                |
 | password       | varchar(60)      | NO   |     |         |                |
 | remember_token | varchar(100)     | YES  |     |         |                |
 | created_at     | timestamp        | YES  |     |         |                |
 | updated_at     | timestamp        | YES  |     |         |                |
 +----------------+------------------+------+-----+---------+----------------+

Star History Chart