composer require ledc/think-model-trait
例如:数据库配置文件config/database.php,生成 数据库连接mysql、数据表user的表注释,命令如下
php think make:trait mysql userphp think clear:table mysql YmdHi --file=exclude --forcephp think make:trait -h
Usage:
make:trait [options] [--] <connection> <table>
Arguments:
connection 数据库连接名称
table 完整的数据表名称
Options:
--m 同时生成模型