asawl/laravel-sqlite-manager
Laravel package that brings SQLite database management into your app: browse tables, inspect schemas, run queries, and manage records from a simple built-in interface. A lightweight, zero-config helper for local development and small SQLite-backed projects.
The package is a local-development companion for inspecting and editing SQLite data without leaving the browser. It is not a migration or schema tool — think "SQLite browser, but Livewire and already wired into your app."
providers entry in bootstrap/providers.php needed.php artisan sqlite-manager:install
config/sqlite-manager.php and appends package .env variables to your .env. Run git diff .env .env.example and mirror the new keys into .env.example so teammates and CI get them too./sqlite-manager and pick a connection from your config/database.php SQLite connections.users table, sort/browse a few rows, and confirm the column-aware editor renders correctly against your real schema (dates, nullables, text blobs). That one pass surfaces most of the surprises before you rely on it.Where to look first:
config/sqlite-manager.php — route path, middleware, table filtering patterns, defaults..env keys — these usually control enablement and the route prefix; treat the enable flag as the production kill switch.database/database.sqlite file location, since the UI is only as useful as the connection it points at.Gate the route to non-production environments. The Livewire UI can create, edit, and delete rows, so it needs protecting from day one. Either restrict the package's middleware stack in config, or wrap the route behind a gate:
// app/Providers/AppServiceProvider.php
use Illuminate\Support\Facades\Gate;
public function boot(): void
{
Gate::define('viewSqliteManager', fn ($user = null) => app()->isLocal());
}
Then add that gate's middleware to the package route in config/sqlite-manager.php (check the exact key — commonly middleware or route.middleware).
Use it as a debugging console for framework tables. The package already filters Laravel framework tables by pattern; when you're chasing a failing job, temporarily widen the pattern so jobs, failed_jobs, cache, and sessions appear, inspect the payload, then narrow it again. Persisting a permissive pattern is how you accidentally delete a cache row mid-request.
Tune preferences per workflow, not per project. Page size, visible columns, Laravel-table visibility, and nullable-field visibility are cookie-backed. That means:
payload, options, or JSON blobs so the grid stays readable.deleted_at.Seed-then-browse loop. Combine with factories for fast UI verification:
php artisan migrate:fresh --seed
php artisan serve
# then browse /sqlite-manager and verify create/edit forms against seeded edge cases
Include edge-case records in seeders — a row with every nullable column NULL, a row with the maximum text length, a row with timezone-sensitive datetimes. The create/edit controls are type-driven, so seeding edge cases is the cheapest way to validate that the form controls match what your model expects.
Prefer the UI for content fixes, Artisan for structural change. Use the manager to correct a bad seed value or flip a feature flag row during testing. Anything involving schema — new columns, index changes, backfills across thousands of rows — belongs in a migration or tinker/Artisan command so it's reproducible and reviewable.
Keep config in the published file. Edit config/sqlite-manager.php rather than vendor files, and commit it. If you support multiple local setups (different SQLite file paths per developer), read the connection from .env and leave the committed config pointed at that env key.
PRAGMA table_info(your_table); is the fastest confirmation.EXPLAIN QUERY PLAN work still need sqlite3, tinker, or a DB tool. Don't promise stakeholders a general SQL workbench..env idempotently-ish, not magically. Re-running sqlite-manager:install after upgrading can duplicate keys. Diff .env after every install and before every commit; keys added by the installer should land in .env.example in the same PR./sqlite-manager 404s, check the published config for a custom path/domain before assuming discovery failed. Also verify the route is registered at all in production-like environments — an enable flag may short-circuit it, which is the desired behavior.datetime casting can disagree — e.g. an integer timestamp column renders as a numeric input, and a TEXT column holding JSON renders as a plain textarea (no validation, no pretty-printing). Validate anything you hand-edit through the UI against the model's casts..sqlite file, then clear compiled views and config — php artisan view:clear && php artisan config:clear — since packaged Livewire views and cached config are the two usual suspects after a config change.How can I help you explore Laravel packages today?