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


return [
];

\SolutionForest\FilamentUnlayer\FilamentUnlayer::make('content');

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

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