PHP code example of yotech-ai / twill-cms-ai-assistant

1. Go to this page and download the library: Download yotech-ai/twill-cms-ai-assistant 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/ */

    

yotech-ai / twill-cms-ai-assistant example snippets


'modules' => [
    'pages' => [
        'label' => 'Pages',
        'description' => 'Standard site pages, served from /{slug}.',
        'model' => App\Models\Page::class,
        'repository' => App\Repositories\PageRepository::class,
        'route' => 'pages',
        'operations' => ['read', 'create', 'update'],   // never 'delete'
        'block_editors' => [
            'default' => ['content-hero', 'content-text', 'content-faq'],
        ],
        'browsers' => [],
        'sync_fields' => [],
        'extra_fields' => [],
    ],
],
bash
php artisan twill-ai:install && php artisan migrate
bash
php artisan queue:work twill-ai --queue=twill-ai --timeout=620