PHP code example of lumiio / cascadedocs

1. Go to this page and download the library: Download lumiio/cascadedocs 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/ */

    

lumiio / cascadedocs example snippets


return [
    'paths' => [
        'source' => ['app/', 'resources/js/'],  // Directories to document
        'output' => 'docs/source_documents/',    // Documentation location
    ],
    'file_types' => ['php', 'js', 'vue', 'jsx', 'ts', 'tsx'],
    'ai' => [
        'default_model' => 'gpt-5.1',           // or 'claude-3-5-sonnet', etc.
        'temperature' => 1,                      // Use 1 for thinking/reasoning models
        'thinking_effort' => 'high',             // For models that support extended thinking
    ],
    'modules' => [
        'granularity' => 'granular',             // 'granular' (more focused) or 'consolidated' (broader)
        'min_files_per_module' => 2,             // Minimum files 

use Lumiio\CascadeDocs\Facades\CascadeDocs;

// Get documentation for a specific file
$docs = CascadeDocs::getDocumentation('app/Models/User.php', 'standard');

// Get all modules
$modules = CascadeDocs::getModules();

// Get module documentation
$moduleDocs = CascadeDocs::getModuleDocumentation('user-management');

// Get file's module assignment
$module = CascadeDocs::getFileModule('app/Services/UserService.php');
bash
php artisan vendor:publish --provider="Shawnveltman\LaravelOpenai\LaravelOpenaiServiceProvider"
bash
php artisan vendor:publish --tag="cascadedocs-config"
bash
# Step 1: Generate class documentation (queued)
php artisan cascadedocs:generate-class-docs
# ⏳ Wait for queue to complete: php artisan queue:work

# Step 2: Generate module documentation (queued)
php artisan cascadedocs:generate-module-docs
# ⏳ Wait for queue to complete: php artisan queue:work

# Step 3: Generate architecture documentation
php artisan cascadedocs:generate-architecture-docs
bash
# Recommended: Run the complete workflow
php artisan cascadedocs:generate-module-docs