PHP code example of numaxlab / nova-ckeditor5-classic

1. Go to this page and download the library: Download numaxlab/nova-ckeditor5-classic 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/ */

    

numaxlab / nova-ckeditor5-classic example snippets


namespace App\Nova;

use NumaxLab\NovaCKEditor5Classic\CKEditor5Classic;

class Post extends Resource
{
    // ...

    public function fields(Request $request)
    {
        return [
            // ...

            CKEditor5Classic::make('Content'),

            // ...
        ];
    }
}

use NumaxLab\NovaCKEditor5Classic\CKEditor5Classic;

CKEditor5Classic::make('Content')->withFiles('public');

use NumaxLab\NovaCKEditor5Classic\Jobs\PruneStaleAttachments;

/**
* Define the application's command schedule.
*
* @param  \Illuminate\Console\Scheduling\Schedule  $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{
    $schedule->call(function () {
        (new PruneStaleAttachments)();
    })->daily();
}
bash
php artisan vendor:publish --tag=config --provider=NumaxLab\\NovaCKEditor5Classic\\FieldServiceProvider
bash
php artisan vendor:publish --tag=migrations --provider=NumaxLab\\NovaCKEditor5Classic\\\FieldServiceProvider 
php artisan migrate