1.资料:

github packagist
github packagist

2.安装:

使用composer安装

# 推荐--dev 因为这个包不需要同步到线上
composer require barryvdh/laravel-ide-helper --dev
# 如果报错请指定版本
composer require barryvdh/laravel-ide-helper=2.*

2.1安装完成后的设置(如果您的laravel版本大于6可以忽略):

config/app.phpproviders数组中添加代码如下:

Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class,

2.2发布资源

php artisan ide-helper:generate

出现_ide_helper.php即代表成功

laravel 增强代码提示功能插件(barryvdh / laravel-ide-helper)

3.使用_ide_helper.php生成模型注释

在命令行输入

php artisan clear-compiled    //清除bootstrap/compiled.php
php artisan ide-helper:generate    //为 Facades 生成注释,需要先清除bootstrap/compiled.php
php artisan ide-helper:models    //为模型生成注释
php artisan ide-helper:meta    //生成 .phpStorm.meta.php

示例

laravel 增强代码提示功能插件(barryvdh / laravel-ide-helper)

相关文章:

  • 2021-12-25
  • 2021-09-14
  • 2022-12-23
  • 2022-12-23
  • 2021-05-28
  • 2021-11-28
  • 2021-05-20
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-07
  • 2022-01-22
  • 2021-09-01
  • 2022-12-23
  • 2021-07-27
相关资源
相似解决方案