Installation
Get Laravel Visual Migrator up and running in minutes.
1. Install via Composer
Install the package using Composer:
composer require ekosuprianto96/laravel-visual-migrator
2. Publish & Setup
Run the install command to automatically publish assets, configuration, and optionally run migrations:
php artisan visual-migrator:install
Note: If you prefer to publish assets and configuration individually, you can use the following commands instead.
Manual Publishing
Publish Everything (Config & Assets):
php artisan vendor:publish --provider="Ekosuprianto96\VisualMigrator\VisualMigratorServiceProvider"
Publish Configuration Only:
php artisan vendor:publish --tag=laravel-visual-migrator-config
Publish Assets Only (Dashboard UI):
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:
php artisan migrate
4. Access the Dashboard
Once migrations are finished, visit the dashboard in your browser:
http://your-app.test/visual-migrator
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
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):
php artisan visual-migrator:refresh
Cleanup Orphaned Data
Clean up visual metadata for deleted migration files:
php artisan visual-migrator:cleanup