A Torchlight plugin for FilamentPHP, it provides a read-only field to hightlight the code under field.
To install, require the package from composer:
composer require mansoor/filament-torchlight
composer require "creagia/filament-code-field:^0.0.2"
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
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')
]);
}
}
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.