crumbls/filament-database
Composer 安装命令:
composer require crumbls/filament-database
包简介
A database management panel for Laravel Filament — like phpMyAdmin, built into your admin.
README 文档
README
A phpMyAdmin-style database manager for Laravel Filament. Browse tables, edit rows, manage schema, run SQL — all from your Filament admin panel.
| Requirement | Minimum Version |
|---|---|
| PHP | 8.3 |
| Laravel | 12.0 – 13.x |
| Filament | 5.0 |
Screenshots
Database Overview
Table Browser
Installation
composer require crumbls/filament-database
Setup
Register the plugin in your Filament panel provider:
use Crumbls\FilamentDatabase\FilamentDatabasePlugin; public function panel(Panel $panel): Panel { return $panel // ... ->plugins([ FilamentDatabasePlugin::make() ->authorize(function() { // You need to customize this. It controls who can view it. return false; }), ]); }
Features
- Database overview — stats dashboard with table counts, row counts, and largest tables at a glance
- Connection switcher — hot-swap between database connections with health checking
- Table browser — searchable table list with row counts, one-click selection
- Row CRUD — paginated rows with sort, search, inline edit, insert, delete
- Bulk operations — select multiple rows for bulk delete or export
- Copy row as — copy any row as PHP array, JSON, SQL INSERT, or Laravel factory format
- Structure viewer — columns with types, nullable, defaults, and inline editing
- Column management — add, rename, modify, and drop columns
- Index viewer — all indexes with columns and uniqueness
- Foreign key viewer — constraints with ON UPDATE/DELETE actions
- Relationships tab — visual map of incoming and outgoing foreign key relationships
- SQL runner — execute raw queries with tabular results, query history, and Cmd/Ctrl+Enter shortcut
- Query EXPLAIN — EXPLAIN/ANALYZE support for MySQL, PostgreSQL, and SQLite
- Schema snapshots — capture your entire database schema as JSON, compare against previous snapshots with color-coded diffs
- Migration generator — generate Laravel migration code from schema diffs, copy or save directly to
database/migrations/ - Export — download table data as CSV, JSON, or SQL INSERT statements
- Import — upload CSV files with automatic column mapping
- Table operations — create, truncate, drop tables with confirmation dialogs
- Dark mode — full support via Filament CSS variables
- Audit logging — optional query and change logging
Configuration
Publish the config:
php artisan vendor:publish --tag=filament-database-config
Plugin API
FilamentDatabasePlugin::make() // Access control ->authorize(fn () => auth()->user()->is_admin) ->onlyForEmails(['admin@example.com']) // Connections ->connections(['mysql', 'sqlite']) ->excludeConnections(['pgsql']) ->defaultConnection('mysql') // Safety ->readOnly() ->preventDestructive() ->requireConfirmation() // Table visibility ->hideTables(['password_resets', 'failed_jobs']) ->showOnlyTables(['users', 'posts']) // SQL runner ->disableQueryRunner() ->queryRunnerReadOnly() // UI ->navigationGroup('System') ->navigationIcon('heroicon-o-circle-stack') ->navigationSort(100) ->navigationLabel('Database') ->rowsPerPage(25) ->maxRowsPerPage(500) // Audit ->logQueries() ->logChanges()
Security
This package gives direct database access. Access is denied to all users by default — you must explicitly grant access via one of the authorization methods below.
Authorization (required)
// Closure — full control FilamentDatabasePlugin::make() ->authorize(fn () => auth()->user()->is_admin) // Laravel Gate FilamentDatabasePlugin::make() ->authorizeUsing('manage-database') // Email allowlist FilamentDatabasePlugin::make() ->onlyForEmails(['admin@example.com'])
Recommended production settings
FilamentDatabasePlugin::make() ->authorize(fn () => auth()->user()->is_admin) ->readOnly() // block all writes ->preventDestructive() // block DROP / TRUNCATE ->connections(['mysql']) // limit to specific connections ->logQueries() // audit all SQL ->logChanges() // audit all data changes
Testing
composer test
177 tests, 390 assertions.
License
MIT
crumbls/filament-database 适用场景与选型建议
crumbls/filament-database 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 277 次下载、GitHub Stars 达 4, 最近一次更新时间为 2026 年 02 月 22 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「database」 「admin」 「mysql」 「sqlite」 「postgres」 「laravel」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 crumbls/filament-database 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 crumbls/filament-database 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 crumbls/filament-database 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Dibi is Database Abstraction Library for PHP
Store your language lines in the database, yaml or other sources
2lenet/EasyAdminPlusBundle
A package for automatically encrypting and decrypting Eloquent attributes in Laravel 5.5+, based on configuration settings.
Analysis module for finding problematical shop data.
A PSR-7 compatible library for making CRUD API endpoints
统计信息
- 总下载量: 277
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 24
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-02-22

