1.使用composer安装插件
composer require barryvdh/laravel-ide-helper
2.在config目录里的app.php文件中的'providers'添加如下内容
Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class,
3.在app目录里的Providers目录里的AppServiceProvider.php文件中的public function register()里输入如下内容来注册
if($this->app->environment()!=='production'){$this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);}
4.生成代码跟踪支持
php artisanide-helper:generate