>  Q&A  >  본문

php - laravel如何添加模型方法提示功能

调用模型的方法 IDE不会有方法、参数提示

$articles = ArticlesModel::paginate(2);

调用模型的时候不会提示paginate这个方法及参数
如何在添加模型方法提示,IDE是PHPSTORM,可能由于模型是抽象类,并且实现了多个底层的接口
如何使phpstorm支持模型中方法的提示

已解决
使用

php artisan ide-helper:models

命令就在ide-helper中生成模型方法提示了

高洛峰高洛峰2720일 전298

모든 응답(1)나는 대답할 것이다

  • PHP中文网

    PHP中文网2017-04-10 18:07:24

    https://github.com/barryvdh/l...

    我用的这个 laravel-ide-helper

    회신하다
    0
  • 취소회신하다