PHPackages                             aozen/prism2torchlight - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. aozen/prism2torchlight

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

aozen/prism2torchlight
======================

Laravel package to seamlessly convert PrismJS HTML code blocks to Torchlight syntax highlighting.

v1.0.0(2y ago)07MITPHP

Since Dec 3Pushed 2y ago1 watchersCompare

[ Source](https://github.com/aozen/prism2torchlight)[ Packagist](https://packagist.org/packages/aozen/prism2torchlight)[ RSS](/packages/aozen-prism2torchlight/feed)WikiDiscussions master Synced 1mo ago

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

Prism2Torchlight
================

[](#prism2torchlight)

**Prism2Torchlight** is a Laravel package designed to effortlessly convert PrismJS HTML code blocks to Torchlight syntax highlighting.

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

[](#installation)

You can install the package via Composer:

```
composer require aozen/prism2torchlight
```

Usage
-----

[](#usage)

To use Prism2Torchlight, you need to include the TorchlightCast class in your Eloquent model's $casts property. This will automatically convert PrismJS code blocks when retrieving data from the database.

```
use Aozen\Prism2Torchlight\TorchlightCast;

class YourModel extends Model
{
    protected $casts = [
        'text' => TorchlightCast::class,
    ];
}
```

Example
-------

[](#example)

```
$text = 'echo "Hello, Laravel!";';
$convertedText = Prism2Torchlight\Prism2Torchlight::convertToTorchlight($text);

echo $convertedText;
```

Requirements
------------

[](#requirements)

1. PHP &gt;= 7.3
2. Laravel &gt;= 7.0

License
-------

[](#license)

This package is open-source software licensed under the MIT license. Feel free to copy and paste this content into your README.md file. Let me know if you have any further requests or modifications!

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

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

Unknown

Total

1

Last Release

889d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5b49826ec500f30a43d14359b7fde2723d999e700ef8c57414b9809450cd0886?d=identicon)[aozn](/maintainers/aozn)

---

Top Contributors

[![aozen](https://avatars.githubusercontent.com/u/16261617?v=4)](https://github.com/aozen "aozen (1 commits)")

---

Tags

laravelcodelaravel-packagetinymcesyntax-highlightingtorchlighthighlightingPrismjscode blockslaravel syntaxlaravel torchlight

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/aozen-prism2torchlight/health.svg)

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

###  Alternatives

[realrashid/sweet-alert

Laravel Sweet Alert Is A Package For Laravel Provides An Easy Way To Display Alert Messages Using The SweetAlert2 Library.

1.2k2.9M21](/packages/realrashid-sweet-alert)[imanghafoori/laravel-nullable

A package to help you write expressive defensive code in a functional manner

151423.7k6](/packages/imanghafoori-laravel-nullable)[murdercode/nova4-tinymce-editor

Boost your Laravel Nova with the TinyMCE editor.

17165.2k](/packages/murdercode-nova4-tinymce-editor)[lara-zeus/accordion

Zeus Accordion is filamentphp layout component to group components

11122.8k2](/packages/lara-zeus-accordion)[paxha/laravel-reportable

This Laravel Eloquent extension provides record according to dates using models.

111.2k](/packages/paxha-laravel-reportable)

PHPackages © 2026

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