PHP code example of dndark / laravel-logic-map

1. Go to this page and download the library: Download dndark/laravel-logic-map 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/ */

    

dndark / laravel-logic-map example snippets


// config/logic-map.php
'scan_paths' => ['app', 'routes', 'database', 'config', 'tests'],
'excludes' => ['app/Generated'],

'modules' => [
    'explicit' => [],
    'directory_roots' => ['app/Modules', 'app/Domain'],
    'semantic' => ['enabled' => true],
],

'http' => [
    'enabled' => true,
    'allowed_environments' => ['local', 'testing'],
    'middleware' => ['web'],
],

'runtime' => [
    'enabled' => true,
    'sample_rate' => 0.1,
    'retention_days' => 7,
    'collect_cache_events' => false,
    'middleware_groups' => ['web', 'api'],
],
bash
php artisan logic-map:workflow 'route:POST:orders/{order}/cancel' --format=json
php artisan logic-map:workflow 'route:POST:orders/{order}/cancel' --format=mermaid
php artisan logic-map:workflow 'App\Services\OrderService::cancel' --format=markdown --output=docs/order-cancel.md