1. Go to this page and download the library: Download rdcstarr/docs-generator 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/ */
namespace App\DocsGenerator;
use Rdcstarr\DocsGenerator\Contracts\AIProvider;
class MyCustomProvider implements AIProvider
{
public function __construct(array $config) { /* ... */ }
public function generate(string $prompt): ?string
{
// call your API, return Markdown
}
}
namespace App\DocsGenerator;
use Rdcstarr\DocsGenerator\Contracts\DocsDriver;
class FilamentDriver implements DocsDriver
{
public function __construct(array $config) { /* ... */ }
public function name(): string { return 'filament'; }
public function indexSection(): string { return '## Filament'; }
public function discoverPages(): array { /* fetch + parse sidebar */ }
public function fetchPage(string $url): ?string { /* fetch + clean HTML */ }
public function buildPrompt(string $url, string $html): string { /* prompt */ }
}