Search by

fartex / strat

CLucasrodrigues22

Dashboard and management for Laravel migrations.

v0.1.2 2026-08-29 19:27 UTC

This package is auto-updated.

Last update: 2026-08-30 15:38:53 UTC


README

Strat

Strat

Dashboard and management for Laravel migrations. Strat gives you a single place to see every migration in your application — which ones have run, which are still pending, and across which database connections — without leaving the browser.

License PHP Laravel

⚠️ Early stage. Strat is under active development and its API, routes, and UI are still evolving. Expect breaking changes until a 1.0 release is tagged.

✨ Features

  • Migration overview — browse every migration with its status (executed / pending), file, and type at a glance.
  • Multi-connection aware — track migrations across multiple database connections, not just the default one.
  • Run migrations from the dashboard — trigger migrate for a specific migration without touching the terminal.
  • Automatic sync — a scheduled job keeps migration state fresh every 30 minutes, with an on-demand sync endpoint too.
  • Migration lifecycle tracking — start/end events are recorded via Laravel's native migration events.
  • Gate-based access control — a single viewStrat gate decides who can see the dashboard, defined in your own app.

📦 Requirements

  • PHP ^8.5
  • Laravel (illuminate/support and illuminate/routing ^13.19)

🚀 Installation

Install the package via Composer:

composer require fartex/strat

Run the install command, which publishes the config, the compiled assets, an authorization provider stub (App\Providers\StratServiceProvider), and runs the package's migrations:

php artisan strat:install

If you'd rather publish each piece manually:

php artisan vendor:publish --tag=strat-config
php artisan vendor:publish --tag=strat-assets
php artisan vendor:publish --tag=strat-provider
php artisan migrate

🧭 Dashboard path

By default, the dashboard is served at /strat. Change it by setting STRAT_PATH in your .env, or by editing the path value in the published config/strat.php:

'path' => env('STRAT_PATH', 'strat'),

🔐 Access control

Strat ships with no default access, on purpose. After installing, customize the viewStrat gate in app/Providers/StratServiceProvider.php to control who can view the dashboard:

Gate::define('viewStrat', function ($user = null) {
    return app()->environment('local');
});

Make sure to review this before deploying to production.

⚙️ Configuration

The published config/strat.php file controls which connections Strat monitors and how dashboard-triggered migrations are executed:

'connections' => [
    // 'mysql',
    // 'pgsql',
],

'migrations' => [
    'async' => env('STRAT_MIGRATIONS_ASYNC', false),
    'connection' => env('STRAT_MIGRATIONS_QUEUE_CONNECTION'),
    'queue' => env('STRAT_MIGRATIONS_QUEUE'),
],

Leave connections empty to monitor only the application's default connection. By default, migrations triggered from the dashboard run synchronously, so Strat works without any extra infrastructure. If your application already runs a queue worker, set STRAT_MIGRATIONS_ASYNC=true and point the connection/queue options at it.

🤝 Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request.

📄 License

Strat is open-sourced software licensed under the MIT license.