database

Installation

Get Laravel Visual Migrator up and running in minutes.

1. Install via Composer

Install the package using Composer:

Terminal
composer require ekosuprianto96/laravel-visual-migrator

2. Publish & Setup

Run the install command to automatically publish assets, configuration, and optionally run migrations:

Terminal
php artisan visual-migrator:install
warning

Note: If you prefer to publish assets and configuration individually, you can use the following commands instead.

Manual Publishing

Publish Everything (Config & Assets):

Terminal
php artisan vendor:publish --provider="Ekosuprianto96\VisualMigrator\VisualMigratorServiceProvider"

Publish Configuration Only:

Terminal
php artisan vendor:publish --tag=laravel-visual-migrator-config

Publish Assets Only (Dashboard UI):

Terminal
php artisan vendor:publish --tag=visual-migrator-assets

3. Run Migrations

After setting up the package, execute the database migrations to create the required internal tables:

Terminal
php artisan migrate

4. Access the Dashboard

Once migrations are finished, visit the dashboard in your browser:

URL
http://your-app.test/visual-migrator
security

Security: The dashboard is only accessible in the local environment by default. It will not load in production.


Configuration

The configuration file is located at config/visual-migrator.php. You can customize the following options:

config/visual-migrator.php
// config/visual-migrator.php return [ 'path' => 'visual-migrator', 'middleware' => [ 'web', // 'auth', ], 'ignore_migrations' => [ 'users', 'password_reset_tokens', 'failed_jobs', 'personal_access_tokens', 'cache', 'jobs', 'job_batches', 'sessions', ], ];

Configuration Options

path

The URL path where the visual migrator dashboard will be accessible. Change this to customize the route prefix.

middleware

Array of middleware applied to all visual migrator routes. Add 'auth' to require authentication.

ignore_migrations

Tables listed here will be excluded from the visual diagram. Perfect for hiding Laravel system/boilerplate tables.


Artisan Commands

Handy commands included with the package:

Reset Metadata

Reset all visual layout data (node positions):

Terminal
php artisan visual-migrator:refresh

Cleanup Orphaned Data

Clean up visual metadata for deleted migration files:

Terminal
php artisan visual-migrator:cleanup