PHPackages                             xpyct/sql-viewer - 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. xpyct/sql-viewer

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

xpyct/sql-viewer
================

SQL Viewer for Laravel

1.2.0(1y ago)33MITTypeScriptPHP ^8.1

Since Nov 1Pushed 1y ago1 watchersCompare

[ Source](https://github.com/XpycT/sql-viewer)[ Packagist](https://packagist.org/packages/xpyct/sql-viewer)[ RSS](/packages/xpyct-sql-viewer/feed)WikiDiscussions master Synced yesterday

READMEChangelog (3)Dependencies (3)Versions (4)Used By (0)

SQL Viewer for Laravel
======================

[](#sql-viewer-for-laravel)

 [Requirements](#requirements) | [Installation](#installation) | [Usage](#usage)

[![sql-viewer](https://private-user-images.githubusercontent.com/120016/382417094-f57fe1d8-45f5-421f-ada4-17aad5b54536.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODIxMzQzNzIsIm5iZiI6MTc4MjEzNDA3MiwicGF0aCI6Ii8xMjAwMTYvMzgyNDE3MDk0LWY1N2ZlMWQ4LTQ1ZjUtNDIxZi1hZGE0LTE3YWFkNWI1NDUzNi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNjIyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDYyMlQxMzE0MzJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT04MTliMjYxNjM2NjQ1ZDgzYWRkODUyOTM5YTc3Mjc4NDkyMDkwMzhhZmYzNGUyOGFjMzEzM2FkNzhmOGU2YmE0JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZwbmcifQ.DZ217svz6sgGJI7vhR6vZHmqqkIImV8patjdn8pNpZo)](https://private-user-images.githubusercontent.com/120016/382417094-f57fe1d8-45f5-421f-ada4-17aad5b54536.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODIxMzQzNzIsIm5iZiI6MTc4MjEzNDA3MiwicGF0aCI6Ii8xMjAwMTYvMzgyNDE3MDk0LWY1N2ZlMWQ4LTQ1ZjUtNDIxZi1hZGE0LTE3YWFkNWI1NDUzNi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNjIyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDYyMlQxMzE0MzJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT04MTliMjYxNjM2NjQ1ZDgzYWRkODUyOTM5YTc3Mjc4NDkyMDkwMzhhZmYzNGUyOGFjMzEzM2FkNzhmOGU2YmE0JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZwbmcifQ.DZ217svz6sgGJI7vhR6vZHmqqkIImV8patjdn8pNpZo)

### Documentation

[](#documentation)

Documentation can be found on the [official website](#).

Get Started
-----------

[](#get-started)

### Requirements

[](#requirements)

- **PHP 8.0+**
- **Laravel 8+**

### Installation

[](#installation)

To install the package via composer, Run:

```
composer require xpyct/sql-viewer
```

After installing the package, publish the front-end assets by running:

```
php artisan sql-viewer:install
```

This is the content that will be published to config/sql-viewer.php

```
return [
    /*
     * By default this package will only run in local development.
     * Do not change this, unless you know what your are doing.
     */
    'enabled' => env('SQL_VIEWER_ENABLED', env('APP_ENV') === 'local'),

    /*
     * The SqlViewer page will be available on this path.
     */
    'path' => env('SQL_VIEWER_PATH', 'sql-viewer'),

    /*
    * These middleware will be assigned to every SqlViewer route, giving you the chance
    * to add your own middlewares to this list or change any of the existing middleware.
    */
    'middleware' => [
        'web',
        // Uncomment this if you want to add auth middleware
        // 'auth',
    ],

    /*
     * Forbidden actions in SQL queries
     */
    'forbidden_actions' => [
        'DROP',
        'TRUNCATE',
        'DELETE',
        'CREATE',
    ],

    /*
     * Maximum number of rows that can be returned from a query (add it to the LIMIT clause)
     */
    'max_limit' => 100,
];
```

### Usage

[](#usage)

Once the installation is complete, you will be able to access **SQL Viewer** directly in your browser.

By default, the application is available at: `{APP_URL}/sql-viewer`.

### Authorization

[](#authorization)

To authorize, add your email to the sql-viewer config and set enabled variable.

You can register a viewSqlViewer gate with your own logic. A good place to do this is in the AuthServiceProvider that ships with Laravel.

```
public function boot()
{
    Gate::define('viewSqlViewer', function ($user = null) {
        return true;
    });
}
```

Credits
-------

[](#credits)

- [XpycT](https://github.com/XpycT)

License
-------

[](#license)

The MIT License (MIT).

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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

Every ~1 days

Total

3

Last Release

606d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

laravellaravelpackagesql-viewer

### Embed Badge

![Health badge](/badges/xpyct-sql-viewer/health.svg)

```
[![Health](https://phpackages.com/badges/xpyct-sql-viewer/health.svg)](https://phpackages.com/packages/xpyct-sql-viewer)
```

###  Alternatives

[illuminate/database

The Illuminate Database package.

2.8k54.9M11.6k](/packages/illuminate-database)[laravel-doctrine/orm

An integration library for Laravel and Doctrine ORM

8465.5M96](/packages/laravel-doctrine-orm)[yajra/laravel-oci8

Oracle DB driver for Laravel via OCI8

8793.2M25](/packages/yajra-laravel-oci8)[lemaur/eloquent-publishing

218.1k1](/packages/lemaur-eloquent-publishing)

PHPackages © 2026

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