| Package Data | |
|---|---|
| Maintainer Username: | NickCousins |
| Maintainer Contact: | me@nickcousins.co.uk (Nick Cousins) |
| Package Create Date: | 2016-05-13 |
| Package Last Update: | 2016-09-15 |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-11-06 15:16:07 |
| Package Statistics | |
|---|---|
| Total Downloads: | 253 |
| Monthly Downloads: | 0 |
| Daily Downloads: | 0 |
| Total Stars: | 48 |
| Total Watchers: | 2 |
| Total Forks: | 5 |
| Total Open Issues: | 1 |
A simple artisan command to view the Schema of an Eloquent model
##Installation
nickcousins/schemaview-laravel
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 | | | |
+----------------+------------------+------+-----+---------+----------------+