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(2mo ago)0177MITVuePHP ^8.2

Since Feb 12Pushed 2mo 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 1mo ago

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

38

—

LowBetter than 85% of packages

Maintenance83

Actively maintained with recent releases

Popularity16

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity37

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

87d 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

[silber/bouncer

Eloquent roles and abilities.

3.6k4.4M25](/packages/silber-bouncer)[cybercog/laravel-love

Make Laravel Eloquent models reactable with any type of emotions in a minutes!

1.2k302.7k1](/packages/cybercog-laravel-love)[cviebrock/eloquent-taggable

Easy ability to tag your Eloquent models in Laravel.

567694.8k3](/packages/cviebrock-eloquent-taggable)[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

423715.4k1](/packages/clickbar-laravel-magellan)[genealabs/laravel-pivot-events

This package introduces new eloquent events for sync(), attach(), detach() or updateExistingPivot() methods on BelongsToMany relation.

1404.9M8](/packages/genealabs-laravel-pivot-events)[reedware/laravel-relation-joins

Adds the ability to join on a relationship by name.

2121.2M13](/packages/reedware-laravel-relation-joins)

PHPackages © 2026

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