dashed/laravel-drift
Laravel Drift helps you detect and resolve database schema drift by comparing your migration history with the live database. It surfaces unexpected tables, columns, indexes, and other changes so you can catch issues before they reach production. Artisan commands make it easy to audit and fix drift.
Because dashed/laravel-drift has no dependents and effectively no community footprint, treat the repository itself — not blog posts or docs sites — as the source of truth. Budget 15 minutes to read README.md, composer.json, and the tests/ directory before installing anything.
Install and pin.
composer require dashed/laravel-drift --prefer-dist
Immediately lock the exact version in composer.json (drop the caret if the package follows semver loosely). With a 0-star package you want reproducible installs, not floating minors.
Confirm auto-discovery. Laravel will register the service provider via extra.laravel.providers if the package is well-behaved. Check composer.json in the package for that block; if absent, add the provider manually in config/app.php (or bootstrap/providers.php on Laravel 11+).
Publish config early.
php artisan vendor:publish --tag=drift-config
If no tag exists, look for vendor/dashed/laravel-drift/config/ and copy it manually. Skim every key — for a small package the config file is usually the best documentation of intended behavior.
Read the tests before your first run. The test suite is where the real contract lives. Look for what the package considers "drift," what the comparison target is, and what the assertions check. This tells you faster than the README whether it fits your use case.
First use case — pick the narrowest one. The natural first run is a single artisan command (something like php artisan drift:check) against a non-production database, or a facade call in php artisan tinker:
\Dashed\Drift\Facades\Drift::check();
Verify the command name and facade alias in the provider's boot()/register() methods rather than guessing.
Scheduled drift detection. The most durable integration is a scheduled command in routes/console.php (or Kernel::schedule()) that runs a check and alerts on non-empty results:
Schedule::command('drift:check')->dailyAt('02:00')
->onFailure(fn () => /* notify */);
Keep the output machine-parseable — pipe to a log channel rather than relying on human-readable console text.
CI gate. If the package exposes a non-zero exit code on drift, wrap it in your pipeline as a pre-deploy step. This is the highest-value pattern: catch unintended schema/content divergence before it reaches production. If exit codes aren't documented, check them yourself in a throwaway branch.
Baseline-and-diff workflow. Mature "drift" tools work best when you snapshot a known-good state once, then compare future runs against it. Look for a --baseline, --snapshot, or equivalent flag; if it exists, generate the baseline immediately after a clean deploy and commit it (or store it in your DB).
Environment pairing. Run the check twice — once against staging, once against production — and diff the two outputs manually rather than trusting a single environment's view. Small packages rarely compare environments for you.
Programmatic use over CLI. If a facade is exposed, prefer calling it from your own command or job so you control retries, logging, and notification. Treat the artisan command as a debugging convenience, not the integration surface.
Thin wrapper. Isolate the package behind one small service class (DriftService) in your app. Given its maturity level, you want a single file to change if you swap it out later.
composer.json for the illuminate/* constraints and confirm they actually cover your Laravel major — not just the one the author develops on.php artisan config:clear before debugging. A stale cached config is the single most common cause of "the package ignores my settings."Dashed\Drift) and repo name are the only clues; verify against the source.-vvv to artisan commands and, if the package emits events, listen for them (Event::listen('*', ...)) to trace what it's doing. With sparse docs, event and log inspection is your debugger.bind, singleton, and interfaces to find override seams before you fork.app/Support/. The MIT license permits it, and you avoid supply-chain surprises from an inactive repo.How can I help you explore Laravel packages today?