PHP code example of solution-forest / filament-unlayer

1. Go to this page and download the library: Download solution-forest/filament-unlayer 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/ */

    

solution-forest / filament-unlayer example snippets


$table->json('content');

use SolutionForest\FilamentUnlayer\FilamentUnlayer;

FilamentUnlayer::make('content');

FilamentUnlayer::make('json-content')->mountHtmlStateTo('data.content');

Hidden::make('content');

protected function mutateFormDataBeforeSave(array $data): array
{
    $data['content'] = $data['json-content']['html'];
    return $data;
}
bash
php artisan vendor:publish --tag="filament-unlayer-config"
bash
php artisan vendor:publish --tag="filament-unlayer-views"