PHPackages                             hatchyu/laravel-db-explorer - 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. hatchyu/laravel-db-explorer

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

hatchyu/laravel-db-explorer
===========================

Database schema and data explorer for Laravel with optional write support

v0.1.0(4mo ago)13.4kMITVuePHP ^8.2

Since Feb 12Pushed 4mo agoCompare

[ Source](https://github.com/rajeshmk/laravel-db-explorer)[ Packagist](https://packagist.org/packages/hatchyu/laravel-db-explorer)[ RSS](/packages/hatchyu-laravel-db-explorer/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (6)Versions (3)Used By (0)

Laravel DB Explorer
===================

[](#laravel-db-explorer)

> ⚠️ **IMPORTANT NOTICE**
>
> **This entire package was built using AI tools: Codex, Antigravity, and GitHub Copilot.**
>
> **No manual coding or manual testing was applied.**
>
> **Coding standards may not be followed. Use with caution in production.**
>
> Please review and test the code thoroughly before deploying to critical systems.

A modern database schema and data explorer for Laravel applications. This package provides a clean and intuitive UI to inspect your database tables, column metadata, browse records, and optionally perform write operations.

Features
--------

[](#features)

- **Table Overview**: Lists all database tables in a clean, card-based dashboard.
- **Table Metadata**: View column names, data types, nullability, and primary/foreign keys.
- **Records Data Grid Modes**:
    - `Raw` mode for read-only raw values.
    - `Editable` mode for formatted values + inline editing controls.
- **Inline Editing**: Edit records directly in the grid (with type-aware inputs).
- **Create / Edit / Delete**: Optional write operations with a configurable write mode.
- **Presentation Types**: Per-column UI control (text, textarea, number, date/time/datetime, boolean, dropdown, foreign key dropdown, color picker).
- **Foreign Key UX**: Searchable FK dropdowns and FK labels shown as `id - display`.
- **Search**: Fast keyword search across all searchable columns in a table.
- **Security-First**: Restricted by default to specific environments and middleware.

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

[](#installation)

You can install the package via composer:

```
composer require hatchyu/laravel-db-explorer
```

The service provider will be automatically registered.

### Publishing Assets

[](#publishing-assets)

Publish frontend assets (required for proper explorer rendering):

```
php artisan vendor:publish --tag=db-explorer-assets --force
```

Optional publishes:

```
php artisan vendor:publish --tag=db-explorer-config
php artisan vendor:publish --tag=db-explorer-views
php artisan vendor:publish --tag=db-explorer-migrations
```

### Install / Update Commands

[](#install--update-commands)

You can use package commands instead of manually publishing tags:

```
php artisan db-explorer:install
php artisan db-explorer:update
```

Helpful options:

```
# Include config/views during install
php artisan db-explorer:install --with-config --with-views

# Force-republish config/views during update
php artisan db-explorer:update --with-config --with-views

# Skip auto-migrate when write mode is enabled
php artisan db-explorer:install --skip-migrate
php artisan db-explorer:update --skip-migrate
```

Quick Start
-----------

[](#quick-start)

1. Install the package:

```
composer require hatchyu/laravel-db-explorer
```

2. Publish explorer assets (required for proper UI rendering):

```
php artisan vendor:publish --tag=db-explorer-assets --force
```

Or run the package installer:

```
php artisan db-explorer:install
```

3. Enable explorer in `.env`:

```
DB_EXPLORER_ENABLED=true
```

4. Optional: enable write mode:

```
DB_EXPLORER_WRITE_ENABLED=true
```

5. If write mode is enabled, run migrations:

```
php artisan migrate
```

Then open:

`https://your-app.com/db-explorer`

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

[](#configuration)

The configuration file is located at `config/db-explorer.php`.

```
return [
    /*
     * Enable or disable the DB Explorer.
     */
    'enabled' => env('DB_EXPLORER_ENABLED', false),

    /*
     * List of environments where the DB Explorer is accessible.
     */
    'allowed_environments' => [
        'local',
    ],

    /*
     * Controls create/edit/delete actions.
     * If null, write mode is enabled only in local environment.
     */
    'write_enabled' => env('DB_EXPLORER_WRITE_ENABLED'),

    /*
     * Default records per page for the data browser.
     */
    'per_page' => 25,

    /*
     * Middleware applied to the DB Explorer routes.
     */
    'middleware' => ['web', 'auth'],
];
```

Usage
-----

[](#usage)

Once installed and enabled, you can access the DB Explorer at:

`https://your-app.com/db-explorer`

### Security

[](#security)

The package includes an `EnsureDbExplorerIsAllowed` middleware that checks:

1. If the explorer is enabled via `DB_EXPLORER_ENABLED`.
2. If the current environment matches `allowed_environments`.

You should always keep `DB_EXPLORER_ENABLED=false` in production unless you have additional security layers.

### Write Mode

[](#write-mode)

- `DB_EXPLORER_WRITE_ENABLED=true` enables create/edit/delete actions.
- `DB_EXPLORER_WRITE_ENABLED=false` forces read-only mode.
- If `DB_EXPLORER_WRITE_ENABLED` is not set, write mode is enabled only in `local` environment.
- Write mode requires running migrations (`php artisan migrate`).
- Publishing `db-explorer-migrations` is optional (use it only if you want migration files copied into your app).

Customization
-------------

[](#customization)

If you want to customize the appearance, you can publish the Blade views:

```
php artisan vendor:publish --tag="db-explorer-views"
```

The views will be available in `resources/views/vendor/db-explorer`.

Credits
-------

[](#credits)

- [Hatchyu Team](https://hatchyu.com)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance74

Regular maintenance activity

Popularity26

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 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

142d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/743e9d5b6f56260847460cad4084ed9c341d791eaad645f0d318f686786d72ac?d=identicon)[rajeshmk](/maintainers/rajeshmk)

---

Top Contributors

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

###  Code Quality

Static AnalysisRector

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/hatchyu-laravel-db-explorer/health.svg)

```
[![Health](https://phpackages.com/badges/hatchyu-laravel-db-explorer/health.svg)](https://phpackages.com/packages/hatchyu-laravel-db-explorer)
```

###  Alternatives

[laravel/pulse

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

1.7k15.1M132](/packages/laravel-pulse)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[yajra/laravel-oci8

Oracle DB driver for Laravel via OCI8

8793.2M25](/packages/yajra-laravel-oci8)[glushkovds/phpclickhouse-laravel

Adapter of the most popular library https://github.com/smi2/phpClickHouse to Laravel

2051.5M2](/packages/glushkovds-phpclickhouse-laravel)[hasinhayder/tyro

Tyro - The ultimate Authentication, Authorization, and Role &amp; Privilege Management solution for Laravel 12 &amp; 13

6804.7k6](/packages/hasinhayder-tyro)[api-platform/laravel

API Platform support for Laravel

58171.6k14](/packages/api-platform-laravel)

PHPackages © 2026

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