mansoor / filament-torchlight
This is my package filament-torchlight
v0.0.3
2023-08-08 16:51 UTC
Requires
- php: ^8.1
- filament/filament: ^3.0
- illuminate/contracts: ^10.0
- spatie/laravel-package-tools: ^1.15.0
- torchlight/torchlight-laravel: ^0.5.13
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.9
- nunomaduro/larastan: ^2.0.1
This package is auto-updated.
Last update: 2024-12-10 00:17:26 UTC
README
A Torchlight plugin for FilamentPHP, it provides a read-only field to hightlight the code under field.
Installation
To install, require the package from composer:
composer require mansoor/filament-torchlight
⚠️ Use version 0.0.2
for Filament 2 support ⚠️
composer require "creagia/filament-code-field:^0.0.2"
Setup Torchlight
You must follow the Torchlight documentation to Add Torchlight Middleware and Publish the Torchlight configuration file
Once you are done. Make sure to create an API Token from torchlight.dev and add to your .env
file.
TORCHLIGHT_TOKEN=your_token_goes_here
Usage
use Mansoor\FilamentTorchlight\TorchlightCode; class FileResource extends Resource { public static function form(Form $form): Form { return $form ->schema([ TorchlightCode::make('code') ->columnSpanFull() ->theme('github-dark') ->language('php') ]); } }
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.