安装
1). 使用 Composer 安装该扩展包:
1 | composer require barryvdh/laravel-ide-helper |
2). 安装完成后,在 config/app.php
添加以下内容到 providers
数组。
1 | Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class, |
3). 接下来运行以下命令生成代码对应文档:
1 | php artisan ide-helper:generate |
由于使用此扩展包会生成相应的代码结构文件, 这些文件可能只有当前的开发者的 IDE 需要, 因此需要添加对应配置到 .gitignore
文件中:
1 | .idea |
到此,此拓展包即安装成功!