diff --git a/docs/CLAUDE.dist.md b/docs/CLAUDE.dist.md index 6d4403c23..bf415c920 100644 --- a/docs/CLAUDE.dist.md +++ b/docs/CLAUDE.dist.md @@ -411,21 +411,17 @@ class Feature_Index_Action extends Spa_Action { ``` -**4. Update Controller** +**4. Update Controller - Remove server-side route entirely:** ```php -// Change #[Route] to #[SPA] -#[SPA] -public static function index(Request $request, array $params = []) { - return rsx_view(SPA); -} - -// Add Ajax endpoints +// Remove #[Route] method completely. Add Ajax endpoints: #[Ajax_Endpoint] public static function fetch_items(Request $request, array $params = []): array { return ['items' => Feature_Model::all()]; } ``` +**CRITICAL**: Do NOT add `#[SPA]` to feature controllers. The `#[SPA]` attribute only exists in the bootstrap controller (e.g., `Frontend_Spa_Controller::index`). Feature controllers should only contain `#[Ajax_Endpoint]` methods for data fetching. + **5. Update Route References** **Search entire codebase for old route references:**