niclas-timm/eloquent-schema-viewer

1.0.0 2023-11-05 14:55 UTC

This package is auto-updated.

Last update: 2024-11-05 17:02:46 UTC


README

Eloquent schema viewer is is a small package for Laravel applications that let's you view the database table schema for your eloquent models.

Installation

Install the package via composer:

composer require --dev niclas-timm/eloquent-schema-viewer

Usage

Once the package is installed, you can use it to print your eloquent model schemas to the terminal:

php artisan eloquent-schema-viewer:view --model="User"

This command will print the schema of the user model to the terminal like so:

Options

One of those two options must be set. Otherwise, the command will fail.

Aliases

Since the command eloquent-schema-viewer:view is quite long, we configured some shorter aliases: esv:view and esv:view-schema do the same thing as eloquent-schema-viewer:view.