# think-annotation **Repository Path**: mirrors_top-think/think-annotation ## Basic Information - **Project Name**: think-annotation - **Description**: ThinkPHP6注解 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: 3.0 - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-18 - **Last Updated**: 2026-05-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # think-annotation for ThinkPHP ## 安装 > composer require topthink/think-annotation ## 配置 > 配置文件位于 `config/annotation.php` ## 使用方法 ### 路由注解 ~~~php 默认会扫描controller目录下的所有类 > 可对个别目录单独配置 ```php //... 'route' => [ 'enable' => true, 'controllers' => [ app_path('controller/admin') => [ 'name' => 'admin/api', 'middleware' => [], ], root_path('other/controller') ], ], //... ``` ### 模型注解 ~~~php