PHP code example of gracjankubicki / laravel-architecture-kit

1. Go to this page and download the library: Download gracjankubicki/laravel-architecture-kit 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/ */

    

gracjankubicki / laravel-architecture-kit example snippets


return [
    'enabled' => [
        Architecture::Actions,
    ],
    'runtime' => [
        'driver' => 'docker', // local | sail | docker | custom
        'service' => 'app',
        'php' => 'php',
        'command' => null,
    ],
];

'runtime' => [
    'driver' => 'custom',
    'service' => null,
    'php' => 'php',
    'command' => ['bin/php-runner'],
],



use GracjanKubicki\ArchitectureKit\Architecture;

return [
    'enabled' => [
        Architecture::ThinControllers,
        Architecture::FormRequests,
        Architecture::Actions,
        Architecture::DataObjects,
        Architecture::ApiResources,
    ],
];

return [
    'enabled' => [
        Architecture::Actions,
        'billing-workflows',
    ],
    'audit' => [
        'exclude' => ['app/Legacy/*'],
    ],
    'rules' => [
        App\Architecture\Rules\NoForbiddenBillingState::class,
    ],
];

'rules' => [
    'ports-and-adapters' => [
        App\Architecture\Rules\RequireBilingualPortDocumentation::class,
    ],
],

// @architecture-kit-ignore thin-controller -- legacy endpoint accepted in PR #123
$invoice->update($payload);

// @architecture-kit-ignore-file query-objects -- generated legacy query object

return [
    'enabled' => [
        Architecture::Actions,
        'billing-workflows',
    ],
];

return [
    'enabled' => [
        Architecture::Actions,
        'billing-workflows',
    ],
    'rules' => [
        'billing-workflows' => [
            App\Architecture\BillingWorkflows\Rules\NoInvoiceStateChangeOutsideBillingAction::class,
            App\Architecture\BillingWorkflows\Rules\NoInvoiceTransitionInController::class,
        ],
    ],
];

return [
    'enabled' => [
        Architecture::Actions,
    ],
    'rules' => [
        App\Architecture\Rules\NoForbiddenProjectPattern::class,
    ],
];
bash
php artisan architecture-kit:plan
php artisan architecture-kit:plan --agent
bash
php artisan boost:update --discover
bash
php artisan architecture-kit:sync --no-interaction
php artisan boost:update --no-interaction
bash
php artisan architecture-kit:guidelines actions --agent
bash
php artisan architecture-kit:audit --agent --limit=20
bash
php artisan architecture-kit:explain E_THIN_CONTROLLER_MODEL_WRITE --agent
bash
php artisan architecture-kit:audit --agent --schema
php artisan architecture-kit:plan --schema
bash
php artisan architecture-kit:guidelines --agent
php artisan architecture-kit:guidelines actions --agent
php artisan architecture-kit:guidelines --schema
bash
php artisan architecture-kit:guard --changed --strict --json
bash
docker compose exec -T app php artisan architecture-kit:guard --changed --strict --json
docker compose exec -T app php artisan architecture-kit:mcp
json
{
    "scripts": {
        "post-update-cmd": [
            "@php artisan architecture-kit:doctor --agent"
        ]
    }
}
text
resources/boost/guidelines/core.blade.php
bash
php artisan architecture-kit:install
php artisan architecture-kit:install-agents
toml
[mcp_servers.architecture-kit]
command = "php"
args = ["artisan", "architecture-kit:mcp"]