PHP code example of desilva / filament-simple-highlight-field

1. Go to this page and download the library: Download desilva/filament-simple-highlight-field library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

desilva / filament-simple-highlight-field example snippets


use Desilva\FilamentSimpleHighlightField\HighlightField;

class FileResource extends Resource
{
    public static function form(Form $form): Form
    {
        return $form
            ->schema([
                HighlightField::make('contents')
                    ->columnSpan('full'),
            ]);
    }
}

return [
    // By default, the plugin will load serve the assets from Filament. You can uncomment the following to specify
    // a custom theme that will then be loaded from the Highlight.js CDN. See https://highlightjs.org/static/demo
    // 'theme' => 'nord',
];
bash
php artisan vendor:publish --tag="filament-simple-highlight-field-config"
bash
php artisan vendor:publish --tag="filament-simple-highlight-field-views"