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 1mo ago

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.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzU1MzE1MTgsIm5iZiI6MTc3NTUzMTIxOCwicGF0aCI6Ii8xMjAwMTYvMzgyNDE3MDk0LWY1N2ZlMWQ4LTQ1ZjUtNDIxZi1hZGE0LTE3YWFkNWI1NDUzNi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNDA3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDQwN1QwMzA2NThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0xMTVhYWYxYmYzMzJmYzhlZmJiMTRkNjM0ZDgyZTQwMjk2MmMwN2NjNjdlMTVjOWNiYzFkNmU5NWQ1NmUxZmYzJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.23J3nMbP8eaXb3c0KqnAIKQbYGo0Dco0MhUOBFLOwmo)](https://private-user-images.githubusercontent.com/120016/382417094-f57fe1d8-45f5-421f-ada4-17aad5b54536.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzU1MzE1MTgsIm5iZiI6MTc3NTUzMTIxOCwicGF0aCI6Ii8xMjAwMTYvMzgyNDE3MDk0LWY1N2ZlMWQ4LTQ1ZjUtNDIxZi1hZGE0LTE3YWFkNWI1NDUzNi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNDA3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDQwN1QwMzA2NThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0xMTVhYWYxYmYzMzJmYzhlZmJiMTRkNjM0ZDgyZTQwMjk2MmMwN2NjNjdlMTVjOWNiYzFkNmU5NWQ1NmUxZmYzJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.23J3nMbP8eaXb3c0KqnAIKQbYGo0Dco0MhUOBFLOwmo)

### 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 49% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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

561d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c3396b337bd20ab64b93c0f211176c3ec3d2388f481f86735810854d43151ede?d=identicon)[XpycT](/maintainers/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.8k52.4M9.4k](/packages/illuminate-database)[laravel-doctrine/orm

An integration library for Laravel and Doctrine ORM

8425.3M87](/packages/laravel-doctrine-orm)[scienta/doctrine-json-functions

A set of extensions to Doctrine that add support for json query functions.

58723.9M36](/packages/scienta-doctrine-json-functions)[sonata-project/entity-audit-bundle

Audit for Doctrine Entities

644989.8k1](/packages/sonata-project-entity-audit-bundle)[highsolutions/eloquent-sequence

A Laravel package for easy creation and management sequence support for Eloquent models with elastic configuration.

121130.3k](/packages/highsolutions-eloquent-sequence)[dragon-code/migrate-db

Easy data transfer from one database to another

15717.4k](/packages/dragon-code-migrate-db)

PHPackages © 2026

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