PHPackages                             rehmanafzal/dbmanager - 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. rehmanafzal/dbmanager

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

rehmanafzal/dbmanager
=====================

A powerful database manager for Laravel — supports SQLite &amp; MySQL with a clean UI

v1.0.0(2mo ago)110MITBladePHP ^8.1

Since Apr 8Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/rehmanafzal536/dbmanager)[ Packagist](https://packagist.org/packages/rehmanafzal/dbmanager)[ RSS](/packages/rehmanafzal-dbmanager/feed)WikiDiscussions main Synced 2w ago

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

Laravel DB Manager
==================

[](#laravel-db-manager)

A powerful, zero-config database manager for Laravel applications. Works with **SQLite** and **MySQL / MariaDB** automatically — install it and visit `/dbmanager`.

Think phpMyAdmin, but built into your Laravel app.

---

Requirements
------------

[](#requirements)

RequirementVersionPHP8.1 or higherLaravel10.x, 11.x, or 12.xSQLite3.25+MySQL / MariaDB5.7+ / 10.3+---

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

[](#installation)

```
composer require rehmanafzal/dbmanager
```

The package auto-discovers via Laravel's package discovery. No service provider registration, no route files to edit, no migrations to run.

Open your browser:

```
http://your-app.test/dbmanager

```

---

Default Login
-------------

[](#default-login)

FieldValueUsername`admin`Password`secret`> Change these immediately after first login via the **Settings** page.

---

Configuration
-------------

[](#configuration)

### Option 1 — Environment variables (recommended)

[](#option-1--environment-variables-recommended)

Add to your `.env` file:

```
DBMANAGER_USERNAME=admin
DBMANAGER_PASSWORD=secret
```

### Option 2 — Publish the config file

[](#option-2--publish-the-config-file)

```
php artisan vendor:publish --tag=dbmanager-config
```

This creates `config/dbmanager.php`:

```
return [
    'username'    => env('DBMANAGER_USERNAME', 'admin'),
    'password'    => env('DBMANAGER_PASSWORD', 'secret'),
    'prefix'      => 'dbmanager',
    'session_key' => 'dbmanager_authenticated',
];
```

### Option 3 — Change credentials from the UI

[](#option-3--change-credentials-from-the-ui)

Go to `/dbmanager/settings` → Change Login Credentials. The new credentials are written directly to your `.env` file.

---

Features
--------

[](#features)

### Dashboard

[](#dashboard)

- Stats: total tables, total rows, database size, driver
- Full table list with row counts
- One-click browse, structure, export, drop per table
- Backup and restore the entire database

---

### Browse &amp; Data Management

[](#browse--data-management)

**Inline cell editing (like phpMyAdmin)**

- Double-click any cell to edit it in place
- Smart input types based on column type:
    - `DATETIME` / `TIMESTAMP` → native datetime picker
    - `DATE` → date picker
    - `TIME` → time picker
    - `ENUM(...)` → dropdown with all enum values
    - `TINYINT(1)` / `BOOLEAN` → dropdown: NULL / 0 (false) / 1 (true)
    - `INT` / `DECIMAL` / `FLOAT` → number input
    - `TEXT` / `BLOB` / `JSON` → textarea
    - Everything else → text input
- Press **Enter** or click **✓ Save** to save via AJAX
- Press **Escape** to cancel
- Green toast on success, red on error

**Bulk row actions**

- Checkbox on every row + Select All
- **Edit Selected Rows** → opens a full bulk edit page showing all selected rows as editable forms with smart inputs per column type
- **Delete Selected** → deletes all selected rows in one query with confirmation

**Other data features**

- Paginated table data (25 / 50 / 100 / 250 rows per page)
- Search across all columns simultaneously
- Sort by any column (ascending / descending)
- Insert row, edit row, delete row
- Import CSV into any table
- Export table as CSV or SQL dump
- Truncate table

---

### Create Table

[](#create-table)

Full phpMyAdmin-style column definition grid:

ColumnDescriptionNameColumn nameTypeGrouped dropdown: Numeric, String, Date/Time, Binary, OtherLength / ValuesAuto-disabled for types that don't need it. Shows `'a','b','c'` hint for ENUM/SETDefaultNone / NULL / Custom value / CURRENT\_TIMESTAMP / Empty stringNot NullCheckboxUniqueCheckbox (creates a UNIQUE index)Auto IncCheckbox (MySQL: AUTO\_INCREMENT PRIMARY KEY)PKCheckbox (marks as PRIMARY KEY)- Set the number of columns and click **Go** to build the grid
- Click **+ Add Column** to add more rows
- `id`, `created_at`, `updated_at` are added automatically

---

### Table Structure

[](#table-structure)

- View all columns: name, type, length, default, not null, key
- **Edit column** — rename, change type, default, not null via modal
- **Rename column** — dedicated rename modal
- **Drop column** — with confirmation
- **Bulk drop** — select multiple columns and drop at once
- **Add multiple columns at once** — same grid as Create Table (Name, Type, Length, Default, Not Null, Unique, Auto Inc, Position)
    - Position: At End / At Beginning / After \[column\]
- **Indexes** — list all, add (INDEX / UNIQUE / FULLTEXT), drop
- **Foreign Keys** *(MySQL only)* — list all, add with ON DELETE / ON UPDATE rules, drop

---

### SQL Query Editor

[](#sql-query-editor)

- Full SQL editor with dark code theme
- `Ctrl + Enter` to execute
- Results displayed in a sortable table
- Export query results as CSV
- Quick-fill buttons for common queries (users, products, orders, list tables)

---

### Import &amp; Convert

[](#import--convert)

Upload a database file and it auto-detects the format and converts if needed:

UploadCurrent DBAction`.sqlite` fileMySQLSQLite → MySQL (types auto-converted)`.sqlite` fileSQLiteDirect importMySQL `.sql` dumpSQLiteMySQL syntax → SQLite syntaxMySQL `.sql` dumpMySQLDirect importSQLite `.sql` dumpMySQLSQLite syntax → MySQL syntaxTwo import modes:

- **Merge** — insert new rows, skip existing ones (by primary key)
- **Replace** — insert or replace rows with matching primary key

---

### Authentication &amp; Settings

[](#authentication--settings)

- Session-based login — no database users required
- Credentials stored in `.env`
- Change username and password from the built-in Settings page
- Settings page shows: driver, database name, host (MySQL), Laravel version, PHP version

---

All Routes
----------

[](#all-routes)

All routes register automatically under `/dbmanager`. Nothing to add to `routes/web.php`.

MethodURLDescriptionGET`/dbmanager/login`Login pageGET`/dbmanager/logout`Sign outGET`/dbmanager`DashboardGET`/dbmanager/settings`Settings &amp; credentialsPOST`/dbmanager/settings/update`Save credentialsGET`/dbmanager/sql`SQL query editorGET`/dbmanager/create-table`Create table formPOST`/dbmanager/create-table`Save new tableDELETE`/dbmanager/drop-table/{table}`Drop a tableGET`/dbmanager/import`Import &amp; convert pagePOST`/dbmanager/import/convert`Run importGET`/dbmanager/backup`Download database backupPOST`/dbmanager/restore`Restore from backupGET`/dbmanager/table/{table}`Browse table rowsGET`/dbmanager/table/{table}/structure`Table structurePOST`/dbmanager/table/{table}/add-column`Add columnsPOST`/dbmanager/table/{table}/rename-column`Rename a columnPOST`/dbmanager/table/{table}/modify-column`Edit column definitionDELETE`/dbmanager/table/{table}/drop-column`Drop a columnDELETE`/dbmanager/table/{table}/bulk-drop-columns`Drop multiple columnsPOST`/dbmanager/table/{table}/add-index`Add an indexDELETE`/dbmanager/table/{table}/drop-index`Drop an indexPOST`/dbmanager/table/{table}/add-foreign-key`Add a foreign keyDELETE`/dbmanager/table/{table}/drop-foreign-key`Drop a foreign keyGET`/dbmanager/table/{table}/create`Insert row formPOST`/dbmanager/table/{table}/store`Save new rowGET`/dbmanager/table/{table}/edit/{id}`Edit row formPUT`/dbmanager/table/{table}/update/{id}`Save row changesDELETE`/dbmanager/table/{table}/delete/{id}`Delete a rowPOST`/dbmanager/table/{table}/inline-update`Inline cell update (AJAX)GET`/dbmanager/table/{table}/bulk-edit-page`Bulk edit pagePOST`/dbmanager/table/{table}/bulk-update`Save bulk editDELETE`/dbmanager/table/{table}/bulk-delete`Bulk delete rowsDELETE`/dbmanager/table/{table}/truncate`Truncate tableGET`/dbmanager/table/{table}/export/csv`Export as CSVGET`/dbmanager/table/{table}/export/sql`Export as SQLPOST`/dbmanager/table/{table}/import/csv`Import CSV---

Database Support Matrix
-----------------------

[](#database-support-matrix)

FeatureSQLiteMySQL / MariaDBBrowse &amp; inline edit✅✅Add / drop columns✅✅Rename column✅ (3.25+)✅Modify column type⚠️ Rename only✅ Full CHANGEColumn position (FIRST / AFTER)❌✅Auto Increment✅✅Indexes✅✅FULLTEXT index❌✅Foreign keys❌✅Backup`.sqlite` download`.sql` dumpRestore`.sqlite` upload`.sql` uploadImport from SQLite file✅✅Import from SQL dump✅✅---

Publish Views
-------------

[](#publish-views)

To customize the UI:

```
php artisan vendor:publish --tag=dbmanager-views
```

Views are copied to `resources/views/vendor/dbmanager/`.

---

Upgrade
-------

[](#upgrade)

```
composer update rehmanafzal/dbmanager
php artisan view:clear
php artisan config:clear
```

---

Security
--------

[](#security)

This package is designed for **development and internal tools**.

- Do **not** expose `/dbmanager` on a public production server without additional protection
- Always change the default `admin` / `secret` credentials
- Consider IP restriction or wrapping routes in your app's `auth` middleware

---

License
-------

[](#license)

MIT — free to use in personal and commercial projects.

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance85

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

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

80d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/192332409?v=4)[rehman536](/maintainers/rehman536)[@rehman536](https://github.com/rehman536)

---

Top Contributors

[![rehmanafzal536](https://avatars.githubusercontent.com/u/211008101?v=4)](https://github.com/rehmanafzal536 "rehmanafzal536 (6 commits)")

---

Tags

laraveldatabasemysqlsqlitemanageradmindbmanager

### Embed Badge

![Health badge](/badges/rehmanafzal-dbmanager/health.svg)

```
[![Health](https://phpackages.com/badges/rehmanafzal-dbmanager/health.svg)](https://phpackages.com/packages/rehmanafzal-dbmanager)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[kirschbaum-development/eloquent-power-joins

The Laravel magic applied to joins.

1.6k29.9M42](/packages/kirschbaum-development-eloquent-power-joins)[api-platform/laravel

API Platform support for Laravel

59156.3k11](/packages/api-platform-laravel)[ntanduy/cloudflare-d1-database

Cloudflare D1 database driver for Laravel — full Eloquent &amp; Query Builder support.

276.8k](/packages/ntanduy-cloudflare-d1-database)[itpathsolutions/dbstan

Database Standardization and Analysis Tool for Laravel

442.1k](/packages/itpathsolutions-dbstan)

PHPackages © 2026

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