PHP code example of phattarachai / laravel-ai-docs
1. Go to this page and download the library: Download phattarachai/laravel-ai-docs 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/ */
phattarachai / laravel-ai-docs example snippets
use Illuminate\Http\Request;
use Phattarachai\AiDocs\AiDocs;
AiDocs::auth(fn (Request $request): bool => $request->user()?->is_admin === true);
'panels' => [
'docs' => ['root' => '.ai/documents', 'label' => 'Documents'],
'tasks' => ['root' => '.ai/tasks', 'label' => 'Tasks'],
],
bash
php artisan ai-docs:doctor
npm run build