PHPackages                             nunocodex/laravel-dibi - 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. nunocodex/laravel-dibi

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

nunocodex/laravel-dibi
======================

An elegant GUI database management tool for your Laravel applications.

024Vue

Since Mar 19Pushed 1y agoCompare

[ Source](https://github.com/nunocodex/laravel-dibi)[ Packagist](https://packagist.org/packages/nunocodex/laravel-dibi)[ RSS](/packages/nunocodex-laravel-dibi/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Dibi
====

[](#dibi)

[![Build Status](https://github.com/cuonggt/laravel-dibi/workflows/tests/badge.svg)](https://github.com/cuonggt/laravel-dibi/actions)[![License](https://camo.githubusercontent.com/1977177b4e61b25a7ea7b8127ab72a9a5a41003708192083e9065b6e0d7e882d/68747470733a2f2f706f7365722e707567782e6f72672f63756f6e6767742f6c61726176656c2d646962692f6c6963656e73652e737667)](https://packagist.org/packages/cuonggt/laravel-dibi)

[![screenshot](https://user-images.githubusercontent.com/8156596/115648495-b9360080-a34f-11eb-86c5-4da253046f86.png)](https://user-images.githubusercontent.com/8156596/115648495-b9360080-a34f-11eb-86c5-4da253046f86.png)

Laravel Dibi is an elegant GUI database management tool for your Laravel applications. It provides a quick access for browsing your database on local/dev server without installing any other applications.

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

[](#installation)

You may install Dibi into your project using the Composer package manager:

```
composer require cuonggt/laravel-dibi
```

After installing Dibi, publish its assets using the `dibi:install` Artisan command:

```
php artisan dibi:install
```

Currently, Dibi only supports MySQL. I hope other DB engines like SQL Server, PostgreSQL, SQLite, etc will be supported in near future.

Dibi use database connection name `mysql` by default to connect. If you would like to use another database connection name, you may use the `Dibi::useDatabaseConnectionName` method. You may call this method from the `boot` method of your application's `App\Providers\DibiServiceProvider`:

```
/**
 * Bootstrap any application services.
 *
 * @return void
 */
public function boot()
{
    parent::boot();

    Dibi::useDatabaseConnectionName('custom_mysql');
}
```

### Dashboard Authorization

[](#dashboard-authorization)

Dibi exposes a dashboard at the `/dibi` URI. By default, you will only be able to access this dashboard in the `local` environment. However, within your `app/Providers/DibiServiceProvider.php` file, there is an [authorization gate](https://laravel.com/docs/8.x/authorization#gates) definition. This authorization gate controls access to Dibi in **non-local** environments. You are free to modify this gate as needed to restrict access to your Dibi installation:

```
/**
 * Register the Dibi gate.
 *
 * This gate determines who can access Dibi in non-local environments.
 *
 * @return void
 */
protected function gate()
{
    Gate::define('viewDibi', function ($user) {
        return in_array($user->email, [
            'admin@example.com',
        ]);
    });
}
```

### Upgrading Dibi

[](#upgrading-dibi)

When upgrading to a new major version of Dibi, it's important that you carefully review the upgrade guide. In addition, when upgrading to any new Dibi version, you should re-publish Dibi's assets:

```
php artisan dibi:publish
```

To keep the assets up-to-date and avoid issues in future updates, you may add the `dibi:publish` command to the `post-update-cmd` scripts in your application's `composer.json` file:

```
{
    "scripts": {
        "post-update-cmd": [
            "@php artisan dibi:publish --ansi"
        ]
    }
}
```

### Customizing Middleware

[](#customizing-middleware)

If needed, you can customize the middleware stack used by Dibi routes by updating your `config/dibi.php` file. If you have not published Dibi's confiugration file, you may do so using the `vendor:publish` Artisan command:

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

```

Once the configuration file has been published, you may edit Dibi's middleware by tweaking the `middleware` configuration option within this file:

```
/*
|--------------------------------------------------------------------------
| Dibi Route Middleware
|--------------------------------------------------------------------------
|
| These middleware will be assigned to every Dibi route - giving you
| the chance to add your own middleware to this list or change any of
| the existing middleware. Or, you can simply stick with this list.
|
*/

'middleware' => [
    'web',
    EnsureUserIsAuthorized::class,
    EnsureUpToDateAssets::class
],
```

### Local Only Installation

[](#local-only-installation)

If you plan to only use Dibi to assist your local development, you may install Dibi using the `--dev` flag:

```
composer require cuonggt/laravel-dibi --dev
php artisan dibi:install
```

After running `dibi:install`, you should remove the `DibiServiceProvider` service provider registration from your application's `config/app.php` configuration file. Instead, manually register Dibi's service providers in the `register` method of your `App\Providers\AppServiceProvider` class. We will ensure the current environment is one of specific environments before registering the providers:

```
/**
 * Register any application services.
 *
 * @return void
 */
public function register()
{
    if ($this->app->environment('local', 'develop', 'staging')) {
        $this->app->register(\Cuonggt\Dibi\DibiServiceProvider::class);
        $this->app->register(DibiServiceProvider::class);
    }
}
```

Finally, you should also prevent the Dibi package from being auto-discovered by adding the following to your `composer.json` file:

```
"extra": {
    "laravel": {
        "dont-discover": [
            "cuonggt/laravel-dibi"
        ]
    }
},
```

License
-------

[](#license)

Laravel Dibi is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity16

Early-stage or recently created project

 Bus Factor1

Top contributor holds 83.3% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/4c26d1a4ae7606cf6a36713bbd57e2a9130a45eb066ee7df2ed982494a644683?d=identicon)[namaless](/maintainers/namaless)

---

Top Contributors

[![cuonggt](https://avatars.githubusercontent.com/u/8156596?v=4)](https://github.com/cuonggt "cuonggt (70 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (11 commits)")[![husam-tariq](https://avatars.githubusercontent.com/u/16601695?v=4)](https://github.com/husam-tariq "husam-tariq (1 commits)")[![l3aro](https://avatars.githubusercontent.com/u/25253808?v=4)](https://github.com/l3aro "l3aro (1 commits)")[![nunocodex](https://avatars.githubusercontent.com/u/21750?v=4)](https://github.com/nunocodex "nunocodex (1 commits)")

### Embed Badge

![Health badge](/badges/nunocodex-laravel-dibi/health.svg)

```
[![Health](https://phpackages.com/badges/nunocodex-laravel-dibi/health.svg)](https://phpackages.com/packages/nunocodex-laravel-dibi)
```

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k116.5M113](/packages/jdorn-sql-formatter)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M87](/packages/propel-propel1)

PHPackages © 2026

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