PHPackages                             nfaiz/sqlhighlighter - 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. nfaiz/sqlhighlighter

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

nfaiz/sqlhighlighter
====================

CodeIgniter 4 SQL Highlighter using highlightjs.

v0.0.9(1y ago)018MITPHP

Since Aug 15Pushed 1y ago1 watchersCompare

[ Source](https://github.com/nfaiz/ci4-sqlhighlighter)[ Packagist](https://packagist.org/packages/nfaiz/sqlhighlighter)[ Docs](https://github.com/nfaiz/ci4-sqlhighlighter)[ RSS](/packages/nfaiz-sqlhighlighter/feed)WikiDiscussions main Synced 1mo ago

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

[![GitHub](https://camo.githubusercontent.com/79b7248d0b371b7ffa5a787299d4d003abec7527f36d3c46003a1b1db032b64e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6e6661697a2f6369342d73716c686967686c696768746572)](https://camo.githubusercontent.com/79b7248d0b371b7ffa5a787299d4d003abec7527f36d3c46003a1b1db032b64e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6e6661697a2f6369342d73716c686967686c696768746572)[![GitHub repo size](https://camo.githubusercontent.com/6e386a9b7237e7c49df49ed4da7534414c15f62f26e94cd113822474ddbeb7d2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7265706f2d73697a652f6e6661697a2f6369342d73716c686967686c6967687465723f6c6162656c3d73697a65)](https://camo.githubusercontent.com/6e386a9b7237e7c49df49ed4da7534414c15f62f26e94cd113822474ddbeb7d2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7265706f2d73697a652f6e6661697a2f6369342d73716c686967686c6967687465723f6c6162656c3d73697a65)[![Hits](https://camo.githubusercontent.com/5773ffb20cd7a49013ba905eccf71770449a8ab7382741acd2331501f89e7b87/68747470733a2f2f686974732e736565796f756661726d2e636f6d2f6170692f636f756e742f696e63722f62616467652e7376673f75726c3d6e6661697a2f6369342d73716c686967686c696768746572)](https://camo.githubusercontent.com/5773ffb20cd7a49013ba905eccf71770449a8ab7382741acd2331501f89e7b87/68747470733a2f2f686974732e736565796f756661726d2e636f6d2f6170692f636f756e742f696e63722f62616467652e7376673f75726c3d6e6661697a2f6369342d73716c686967686c696768746572)

CodeIgniter 4 SQL Highlighter
=============================

[](#codeigniter-4-sql-highlighter)

Description
-----------

[](#description)

A Better Look SQL Highlighter for CodeIgniter 4 database debug toolbar using [highlightjs](https://highlightjs.org).

Warning

Warning! This library will modify several CodeIgniter 4 system files. Use at your own risk.

Table of contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Setup](#setup)
- [ScreenShot](#screenshot)

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

[](#installation)

Install via composer:

```
composer require nfaiz/sqlhighlighter

```

Setup
-----

[](#setup)

Run following command using command prompt/terminal.

```
php spark hl:setup

```

### Modify SQL Highlighter Assets.

[](#modify-sql-highlighter-assets)

Open `app/Config/Toolbar.php` and find $sqlHighlighterAssets

```
    public array $sqlHighlighterAssets = [
        'js' => 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/highlight.min.js',
        'css_light' => 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/styles/atom-one-light.min.css',
        'css_dark' => 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/styles/atom-one-dark.min.css',
    ];
```

Screenshot
----------

[](#screenshot)

### Before

[](#before)

- Light

[![Light mode](https://user-images.githubusercontent.com/1330109/193412805-a923b570-a4b1-47e6-956c-3f9f97e8c2d8.png)](https://user-images.githubusercontent.com/1330109/193412805-a923b570-a4b1-47e6-956c-3f9f97e8c2d8.png)

- Dark

[![Dark mode](https://user-images.githubusercontent.com/1330109/193412939-b132801a-a639-4d1e-a57e-c2df1d628a6d.png)](https://user-images.githubusercontent.com/1330109/193412939-b132801a-a639-4d1e-a57e-c2df1d628a6d.png)

### After

[](#after)

- Light

[![Light mode](https://user-images.githubusercontent.com/1330109/193412867-83603790-0c44-402b-b790-4f3d6576c412.png)](https://user-images.githubusercontent.com/1330109/193412867-83603790-0c44-402b-b790-4f3d6576c412.png)

- Dark

[![Dark mode](https://user-images.githubusercontent.com/1330109/193412970-faa3896e-8425-44a5-961e-ca9e553fecd9.png)](https://user-images.githubusercontent.com/1330109/193412970-faa3896e-8425-44a5-961e-ca9e553fecd9.png)

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity31

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

641d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8e60dcc2e275d40f209a301e76730c4ade96dead7878dd4d6483ac1d01a67d84?d=identicon)[nfaiz](/maintainers/nfaiz)

---

Top Contributors

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

---

Tags

debugtoolbardatabasesqlcodeignitersyntaxcodeigniter4

### Embed Badge

![Health badge](/badges/nfaiz-sqlhighlighter/health.svg)

```
[![Health](https://phpackages.com/badges/nfaiz-sqlhighlighter/health.svg)](https://phpackages.com/packages/nfaiz-sqlhighlighter)
```

###  Alternatives

[doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.

9.7k578.4M5.6k](/packages/doctrine-dbal)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[ifsnop/mysqldump-php

PHP version of mysqldump cli that comes with MySQL

1.3k5.5M69](/packages/ifsnop-mysqldump-php)[aura/sqlquery

Object-oriented query builders for MySQL, Postgres, SQLite, and SQLServer; can be used with any database connection library.

4572.9M34](/packages/aura-sqlquery)[tatter/relations

Entity relationships for CodeIgniter 4

9022.3k1](/packages/tatter-relations)[tatter/schemas

Database schema management, for CodeIgniter 4

2328.5k1](/packages/tatter-schemas)

PHPackages © 2026

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