A Livewire-powered database browser for Laravel. Lists your application's tables and lets you search, sort, paginate, and edit records inline — two drop-in components, styled with Tailwind, that work against any table in your default database connection.
This is the package behind the /database inspector page in DevDojo Platform apps, but it is a
standalone utility you can mount in any Laravel + Livewire application.
Two Livewire components that talk to each other:
devdojo.tables— the table list. Shows every table in your database (minus the excluded ones), with instant client-side filtering and configurable pinned ordering. Clicking a table tells the browser component to load it.devdojo.database— the record browser for the selected table:- Search across all columns (or a configured subset per table), debounced as you type.
- Sort by any column — click a header to sort, click again to flip direction. The default sort column is the table's primary key.
- Paginate — 15 rows per page by default (the component's public
$paginateproperty). - Edit inline — clicking a row opens a slide-over editor with one field per column. Saving writes only the columns you changed, then shows a "Saved successfully" toast.
Rows are addressed by the table's single-column primary key, which the package detects
from the schema (it doesn't have to be id). Tables without one — composite-key pivots, for
example — are still browsable, but read-only.
A small support class, DevDojo\Database\Support\TableManager, powers both components and is
resolvable from the container if you need the same table/column/primary-key introspection in
your own code (tableNames(), tables() with row counts, columns(), primaryKey()).
- PHP 8.3+
- Laravel 11+
- Livewire 3+ in the host application (Alpine is bundled with Livewire)
- Tailwind CSS in your build (see Styling)
You can install the package via composer:
composer require devdojo/databaseThe service provider is auto-discovered and registers both components — there are no migrations and no routes. Optionally publish the config:
php artisan vendor:publish --tag=devdojo-database-config # → config/devdojo-database.phpDrop the Livewire components onto any page:
@livewire('devdojo.tables')
@livewire('devdojo.database')A typical layout puts devdojo.tables in a sidebar and devdojo.database in the main pane —
they communicate through Livewire events, so they don't need to share a parent component. Both
default to the users table; pass a different starting table if you want:
@livewire('devdojo.database', ['table' => 'posts'])Protect the page. The components read and write your database directly and enforce no authorization of their own — mount them behind whatever auth, middleware, or environment gating your app requires.
config/devdojo-database.php:
| Key | What it does | Default |
|---|---|---|
table-exclude |
Tables hidden from the browser. | migrations, password_reset_tokens, sessions, cache, cache_locks, jobs, job_batches, failed_jobs |
table-order |
Tables pinned to the top of the list, in order. | ['users'] |
searchable |
Optional per-table searchable columns, e.g. 'users' => ['name', 'email']. Tables not listed fall back to searching all of their columns. |
[] |
The component views are built with Tailwind utility classes, so your build needs to scan the package's views for classes to compile.
Tailwind v4 — add to your CSS entry:
@source "../../vendor/devdojo/database/src/**/*.blade.php";Tailwind v3 — add to tailwind.config.js:
content: [
// ...
'./vendor/devdojo/database/src/**/*.blade.php',
],Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email tony@devdojo.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.