PHPackages                             filaforge/filament-database-tools - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. filaforge/filament-database-tools

ActiveLibrary[Database &amp; ORM](/categories/database)

filaforge/filament-database-tools
=================================

Combined database viewer and query builder for FilamentPHP - A comprehensive tool for database management

v1.0.0(9mo ago)112↓50%MITPHPPHP ^8.1

Since Aug 19Pushed 9mo agoCompare

[ Source](https://github.com/filaforge/filament-database-tools)[ Packagist](https://packagist.org/packages/filaforge/filament-database-tools)[ Docs](https://github.com/filaforge/database-tools)[ RSS](/packages/filaforge-filament-database-tools/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (5)Used By (0)

Filaforge Database Tools
========================

[](#filaforge-database-tools)

A comprehensive Filament plugin that provides essential database management tools directly in your admin panel.

Features
--------

[](#features)

- **Database Backup**: Create and manage database backups
- **Schema Management**: View and modify database structure
- **Data Import/Export**: Bulk data operations with multiple formats
- **Query Optimization**: Analyze and optimize database queries
- **Table Management**: Create, modify, and drop database tables
- **Index Management**: Manage database indexes for performance
- **User Management**: Database user and permission management
- **Monitoring**: Real-time database performance monitoring
- **Migration Tools**: Advanced migration management utilities

Installation
------------

[](#installation)

### 1. Install via Composer

[](#1-install-via-composer)

```
composer require filaforge/database-tools
```

### 2. Publish &amp; Migrate

[](#2-publish--migrate)

```
# Publish provider groups (config, views, migrations)
php artisan vendor:publish --provider="Filaforge\\DatabaseTools\\Providers\\DatabaseToolsServiceProvider"

# Run migrations
php artisan migrate
```

### 3. Register Plugin

[](#3-register-plugin)

Add the plugin to your Filament panel provider:

```
use Filament\Panel;

public function panel(Panel $panel): Panel
{
    return $panel
        // ... other configuration
        ->plugin(\Filaforge\DatabaseTools\DatabaseToolsPlugin::make());
}
```

Setup
-----

[](#setup)

### Configuration

[](#configuration)

The plugin will automatically:

- Publish configuration files to `config/database-tools.php`
- Publish view files to `resources/views/vendor/database-tools/`
- Publish migration files to `database/migrations/`
- Register necessary routes and middleware

### Database Configuration

[](#database-configuration)

Configure database tools in the published config file:

```
// config/database-tools.php
return [
    'backup' => [
        'enabled' => true,
        'path' => storage_path('backups/database'),
        'retention_days' => 30,
    ],
    'import' => [
        'max_file_size' => '10MB',
        'allowed_extensions' => ['csv', 'xlsx', 'json'],
    ],
    'export' => [
        'chunk_size' => 1000,
        'timeout' => 300,
    ],
    'permissions' => [
        'admin_only' => true,
        'allowed_roles' => ['admin', 'database_manager'],
    ],
];
```

### Environment Variables

[](#environment-variables)

Add these to your `.env` file if needed:

```
DB_TOOLS_BACKUP_ENABLED=true
DB_TOOLS_BACKUP_PATH=storage/backups/database
DB_TOOLS_MAX_FILE_SIZE=10MB
```

Usage
-----

[](#usage)

### Accessing Database Tools

[](#accessing-database-tools)

1. Navigate to your Filament admin panel
2. Look for the "Database Tools" menu item
3. Choose the tool you want to use

### Database Backup

[](#database-backup)

1. **Create Backup**: Generate a new database backup
2. **Schedule Backups**: Set up automatic backup schedules
3. **Download Backups**: Download backup files locally
4. **Restore Backups**: Restore from previous backups
5. **Manage Retention**: Configure backup retention policies

### Schema Management

[](#schema-management)

1. **View Tables**: Browse all database tables and their structure
2. **Modify Schema**: Add, modify, or remove columns
3. **Create Tables**: Build new tables with custom schemas
4. **Drop Tables**: Safely remove unused tables
5. **View Relationships**: Explore table relationships and foreign keys

### Data Import/Export

[](#data-importexport)

1. **Import Data**: Upload CSV, Excel, or JSON files
2. **Export Data**: Download table data in various formats
3. **Bulk Operations**: Perform operations on large datasets
4. **Data Validation**: Validate imported data before insertion
5. **Error Handling**: Manage import/export errors gracefully

### Query Optimization

[](#query-optimization)

1. **Query Analysis**: Analyze slow queries and bottlenecks
2. **Index Suggestions**: Get recommendations for new indexes
3. **Performance Monitoring**: Track query execution times
4. **Query History**: Review and optimize previous queries

Troubleshooting
---------------

[](#troubleshooting)

### Common Issues

[](#common-issues)

- **Permission denied**: Ensure the user has database management rights
- **Backup failures**: Check disk space and write permissions
- **Import timeouts**: Adjust chunk size and timeout settings
- **Memory limits**: Large operations may exceed PHP memory limits

### Debug Steps

[](#debug-steps)

1. Check the plugin configuration:

```
php artisan config:show database-tools
```

2. Verify routes are registered:

```
php artisan route:list | grep database-tools
```

3. Test database connectivity:

```
php artisan tinker
# Test database connection manually
```

4. Check backup directory permissions:

```
ls -la storage/backups/database
```

5. Clear caches:

```
php artisan optimize:clear
```

6. Check logs for errors:

```
tail -f storage/logs/laravel.log
```

### Performance Optimization

[](#performance-optimization)

- Use smaller chunk sizes for large imports
- Schedule backups during low-traffic periods
- Monitor disk space for backup storage
- Use appropriate indexes for frequently queried columns

Security Considerations
-----------------------

[](#security-considerations)

### Access Control

[](#access-control)

- **Role-based permissions**: Restrict access to authorized users only
- **Database privileges**: Use dedicated database users with limited permissions
- **Audit logging**: Track all database operations and changes
- **Backup security**: Secure backup files and access

### Best Practices

[](#best-practices)

- Never expose database tools to public users
- Regularly review and update user permissions
- Encrypt sensitive backup files
- Monitor and log all database changes
- Use read-only database users when possible

Uninstall
---------

[](#uninstall)

### 1. Remove Plugin Registration

[](#1-remove-plugin-registration)

Remove the plugin from your panel provider:

```
// remove ->plugin(\Filaforge\DatabaseTools\DatabaseToolsPlugin::make())
```

### 2. Roll Back Migrations (Optional)

[](#2-roll-back-migrations-optional)

```
php artisan migrate:rollback
# or roll back specific published files if needed
```

### 3. Remove Published Assets (Optional)

[](#3-remove-published-assets-optional)

```
rm -f config/database-tools.php
rm -rf resources/views/vendor/database-tools
```

### 4. Remove Package and Clear Caches

[](#4-remove-package-and-clear-caches)

```
composer remove filaforge/database-tools
php artisan optimize:clear
```

### 5. Clean Up Backups (Optional)

[](#5-clean-up-backups-optional)

```
rm -rf storage/backups/database
```

Support
-------

[](#support)

- **Documentation**: [GitHub Repository](https://github.com/filaforge/database-tools)
- **Issues**: [GitHub Issues](https://github.com/filaforge/database-tools/issues)
- **Discussions**: [GitHub Discussions](https://github.com/filaforge/database-tools/discussions)

Contributing
------------

[](#contributing)

We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.

License
-------

[](#license)

This plugin is open-sourced software licensed under the [MIT license](LICENSE).

---

**Made with ❤️ by the Filaforge Team**

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance58

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

272d ago

Major Versions

0.1.2 → v1.0.02025-08-19

### Community

Maintainers

![](https://www.gravatar.com/avatar/e7ccd0e302c517e0c6bc2b4ef05008e5beb1621bf5a64b17b82cdceb19566389?d=identicon)[filaforge](/maintainers/filaforge)

---

Top Contributors

[![blhk0532](https://avatars.githubusercontent.com/u/221689993?v=4)](https://github.com/blhk0532 "blhk0532 (5 commits)")

---

Tags

laraveldatabasequeryadmintoolsfilamentViewerpanel

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/filaforge-filament-database-tools/health.svg)

```
[![Health](https://phpackages.com/badges/filaforge-filament-database-tools/health.svg)](https://phpackages.com/packages/filaforge-filament-database-tools)
```

###  Alternatives

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[tpetry/laravel-query-expressions

Database-independent Query Expressions as a replacement to DB::raw calls

357436.5k2](/packages/tpetry-laravel-query-expressions)[relaticle/custom-fields

User Defined Custom Fields for Laravel Filament

15828.6k](/packages/relaticle-custom-fields)[tomatophp/filament-locations

Database Seeds for Countries / Cities / Areas / Languages / Currancy with ready to use resources for FilamentPHP

2320.8k6](/packages/tomatophp-filament-locations)[sarfraznawaz2005/indexer

Laravel package to monitor SELECT queries and offer best possible INDEX fields.

562.7k](/packages/sarfraznawaz2005-indexer)[okeonline/filament-archivable

A filament plugin to use archivable models

208.1k](/packages/okeonline-filament-archivable)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
