PHPackages                             mahmoudabdelhalim/db-manager - 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. mahmoudabdelhalim/db-manager

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

mahmoudabdelhalim/db-manager
============================

A Laravel MySQL database manager UI package

v1.0.0(1mo ago)19↓100%MITBladePHP ^8.2

Since May 2Pushed 1mo agoCompare

[ Source](https://github.com/mahmoudabdelhalim/db-manager)[ Packagist](https://packagist.org/packages/mahmoudabdelhalim/db-manager)[ RSS](/packages/mahmoudabdelhalim-db-manager/feed)WikiDiscussions master Synced 1w ago

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

 [![DB Manager Banner](art/banner.svg)](art/banner.svg)

 [ ![Latest Version](https://camo.githubusercontent.com/a4acd498f83914d9dfdedff9f7ab1838684ecdba2bfba854161addcb7934ae7b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d61686d6f7564616264656c68616c696d2f64622d6d616e616765723f7374796c653d666c61742d73717561726526636f6c6f723d363336366631266c6162656c3d76657273696f6e) ](https://packagist.org/packages/mahmoudabdelhalim/db-manager) [ ![Total Downloads](https://camo.githubusercontent.com/b2fd0c0f4fb448e7eb5b81010e1cffdf45644f4df8fa6e374f2bb84bafd854ac/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d61686d6f7564616264656c68616c696d2f64622d6d616e616765723f7374796c653d666c61742d73717561726526636f6c6f723d336238326636266c6162656c3d696e7374616c6c73) ](https://packagist.org/packages/mahmoudabdelhalim/db-manager) [ ![PHP Version](https://camo.githubusercontent.com/6038af2a9fe8c6c0d216ea0315122ac858c334e7f50e3cf137592257a5fafa4a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6d61686d6f7564616264656c68616c696d2f64622d6d616e616765723f7374796c653d666c61742d73717561726526636f6c6f723d313062393831) ](https://packagist.org/packages/mahmoudabdelhalim/db-manager) [ ![Laravel](https://camo.githubusercontent.com/b21bc2003aa619c22eebfa5bcd69dca1cc7effe70502ebde76cd4801f3c84f9e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d3130253230253743253230313125323025374325323031322d4646324432303f7374796c653d666c61742d737175617265266c6f676f3d6c61726176656c266c6f676f436f6c6f723d7768697465) ](https://packagist.org/packages/mahmoudabdelhalim/db-manager) [ ![License](https://camo.githubusercontent.com/17d23f24ded96d008852e69675887f6536908ce2515f2b7bc948e9708012fa2e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6d61686d6f7564616264656c68616c696d2f64622d6d616e616765723f7374796c653d666c61742d73717561726526636f6c6f723d663539653062) ](LICENSE.md)

**DB Manager** is a beautiful, full-featured Laravel package that brings a phpMyAdmin-style database management UI directly into your Laravel application — no separate installation, no separate authentication. Browse tables, run SQL queries, manage structure, insert and edit rows, import/export databases — all from a clean, modern interface protected by your own middleware stack.

---

✨ Features
----------

[](#-features)

- 🗄️ **Browse &amp; manage** databases, tables, columns, indexes, and foreign keys
- ✏️ **Insert, edit, and delete** rows with smart type-aware inputs
- ⚡ **SQL editor** with syntax highlighting (CodeMirror) and auto-pagination
- 📤 **Export** databases as SQL dumps
- 📥 **Import** SQL files directly from the browser
- 🔌 **Three connection modes** — use Laravel's own DB, show all databases, or present a custom login form
- 🛡️ **Fully protected** by your existing Laravel middleware (`auth`, gates, custom middleware)
- 🎨 **Self-contained UI** — no CSS framework conflicts, no dependency on your app's layout
- ⚙️ **Publishable** config and service provider stub for deep customization
- 🔧 **Zero config** out of the box — works immediately after install

---

📋 Requirements
--------------

[](#-requirements)

RequirementVersionPHP`^8.2`Laravel`^10.0 | ^11.0 | ^12.0`MySQL / MariaDBany version supported by PDO---

🚀 Installation
--------------

[](#-installation)

Install the package via Composer:

```
composer require mahmoudabdelhalim/db-manager
```

The package is auto-discovered by Laravel — no manual provider registration needed.

That's it. Visit `/db-manager` in your browser (you must be logged in via Laravel's default `auth` middleware).

---

⚙️ Configuration
----------------

[](#️-configuration)

Publish the config file:

```
php artisan vendor:publish --tag=db-manager-config
```

This creates `config/db-manager.php`:

```
return [

    /*
    |--------------------------------------------------------------------------
    | Enable / Disable
    |--------------------------------------------------------------------------
    | Quickly turn the entire UI on or off without touching routes.
    | When disabled, all DB Manager routes return a 404.
    */
    'enabled' => env('DB_MANAGER_ENABLED', true),

    /*
    |--------------------------------------------------------------------------
    | URL Prefix
    |--------------------------------------------------------------------------
    | The URI prefix for all DB Manager routes.
    | Default: yourapp.com/db-manager
    */
    'prefix' => env('DB_MANAGER_PREFIX', 'db-manager'),

    /*
    |--------------------------------------------------------------------------
    | Middleware
    |--------------------------------------------------------------------------
    | Middleware applied to all DB Manager routes.
    | Add any gate, role, or custom middleware here.
    */
    'middleware' => ['web', 'auth'],

    /*
    |--------------------------------------------------------------------------
    | Connection Mode
    |--------------------------------------------------------------------------
    | Controls how DB Manager connects to MySQL.
    |
    | 'laravel'  — auto-connects using Laravel's default DB config,
    |              shows only the application's own database.
    |
    | 'all'      — same credentials as 'laravel' but shows every
    |              database on the MySQL server.
    |
    | 'custom'   — presents a login form; credentials are stored
    |              in the session for the duration of the visit.
    */
    'connection_mode' => env('DB_MANAGER_CONNECTION_MODE', 'laravel'),

    /*
    |--------------------------------------------------------------------------
    | Laravel Connection Name
    |--------------------------------------------------------------------------
    | Which connection from config/database.php to use in 'laravel'
    | and 'all' modes. Leave null to use the default connection.
    */
    'connection' => env('DB_MANAGER_CONNECTION', null),

];
```

You can also set these values in your `.env` file:

```
DB_MANAGER_ENABLED=true
DB_MANAGER_PREFIX=db-manager
DB_MANAGER_CONNECTION_MODE=laravel
DB_MANAGER_CONNECTION=mysql
```

---

🔌 Connection Modes
------------------

[](#-connection-modes)

### `laravel` *(default)*

[](#laravel-default)

Automatically connects using your app's existing database credentials from `config/database.php`. Only your application's own database is shown. No login form — access is controlled entirely by your middleware.

```
'connection_mode' => 'laravel',
'connection'      => null, // uses DB_CONNECTION from .env
```

### `all`

[](#all)

Same as `laravel` but shows **all databases** on the MySQL server that the configured user has access to. Useful for developers managing multiple databases on the same server.

```
'connection_mode' => 'all',
```

### `custom`

[](#custom)

Presents a MySQL login form on first visit. Credentials (host, port, username, password) are stored in the session. The user can disconnect at any time. Ideal for shared developer tools or staging environments.

```
'connection_mode' => 'custom',
```

---

🛡️ Middleware &amp; Authorization
---------------------------------

[](#️-middleware--authorization)

By default, DB Manager is protected by `['web', 'auth']` — meaning the user must be authenticated in your Laravel app. You can change this to any middleware, gate, or role in the config:

```
// config/db-manager.php

'middleware' => ['web', 'auth', 'can:access-db-manager'],
```

Or use a role-based package like Spatie:

```
'middleware' => ['web', 'auth', 'role:admin'],
```

### Custom Service Provider (Advanced)

[](#custom-service-provider-advanced)

For full control, publish the service provider stub:

```
php artisan vendor:publish --tag=db-manager-provider
```

This creates `app/Providers/DbManagerServiceProvider.php`. Register it in `bootstrap/providers.php` (Laravel 11+):

```
// bootstrap/providers.php
return [
    App\Providers\DbManagerServiceProvider::class,
];
```

Or in `config/app.php` (Laravel 10):

```
'providers' => [
    App\Providers\DbManagerServiceProvider::class,
],
```

> **Note:** Once you register your custom provider, remove the package's auto-discovery entry from `config/app.php`'s `dont-discover` array or the package's own provider will also register — causing duplicates.

---

📁 Published Files Reference
---------------------------

[](#-published-files-reference)

CommandPublishes to`--tag=db-manager-config``config/db-manager.php``--tag=db-manager-provider``app/Providers/DbManagerServiceProvider.php`---

🔒 Security
----------

[](#-security)

If you discover any security vulnerabilities, please send an email to **** instead of opening a public issue.

---

📄 License
---------

[](#-license)

This package is open-source software licensed under the **MIT License**. See the [LICENSE](LICENSE.md) file for details.

---

 Made with ❤️ by [Mahmoud Abd Elhalim](https://github.com/mahmoudabdelhalim)

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance92

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

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

Unknown

Total

1

Last Release

39d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5431007ec26b6e8f431ad999dbcabdfffcf37ff17a78a136e27e9c7f4f8c1f03?d=identicon)[m.abdelhalim](/maintainers/m.abdelhalim)

---

Top Contributors

[![mahmoudabdelhalim](https://avatars.githubusercontent.com/u/16545049?v=4)](https://github.com/mahmoudabdelhalim "mahmoudabdelhalim (2 commits)")

---

Tags

laraveldatabasemysqlmanager

### Embed Badge

![Health badge](/badges/mahmoudabdelhalim-db-manager/health.svg)

```
[![Health](https://phpackages.com/badges/mahmoudabdelhalim-db-manager/health.svg)](https://phpackages.com/packages/mahmoudabdelhalim-db-manager)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3325.1M337](/packages/psalm-plugin-laravel)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k28.4M134](/packages/laravel-cashier)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k14.1M120](/packages/laravel-pulse)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9732.3M121](/packages/roots-acorn)[laravel/cashier-paddle

Cashier Paddle provides an expressive, fluent interface to Paddle's subscription billing services.

268880.7k3](/packages/laravel-cashier-paddle)[api-platform/laravel

API Platform support for Laravel

59156.3k10](/packages/api-platform-laravel)

PHPackages © 2026

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