Laravel-ide-helper 生成模型注释的两种方法
多个模型:直接php artisan ide-helper:models
,当然也可以php artisan ide-helper:models -W
单个模型:这个不能按照github上的readme来,坑爹。必须指明具体的类全名:php artisan ide-helper:models "App\Models\User"
。
至于readme上写的:
> php artisan ide-helper:models Post User
及
php artisan ide-helper:models --dir="path/to/models" --dir="app/src/Model"
我试了很多次都没有成功,感觉或许是有BUG,在
vendor/barryvdh/laravel-ide-helper/src/Console/ModelsCommand.php
if (class_exists($name)) {
但也可能跟此包依赖的其他包的版本有关系吧。。。
本作品采用《CC 协议》,转载必须注明作者和本文链接
推荐文章: