项目地址:
https://github.com/barryvdh/laravel-ide-helper
安装方法:
安装之前请确认已经配置数据库连接
进入项目目录
composer require barryvdh/laravel-ide-helper
然后在app/app.php的providers中添加
'Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider'
接着运行
php artisan clear-compiled php artisan ide-helper:generate php artisan optimize
还可以在composer.json的post-update-cmd中加入命令保证helper在每次commit都会更新,如下:
"php artisan clear-compiled", "php artisan ide-helper:generate", "php artisan optimize"