Laravel 10个辅助函数 VS code intelephense问题

huangapple go评论76阅读模式
英文:

Laravel 10 helper functions VS code intelephense issues

问题

我最近将我的laravel项目从9.x升级到10.x。
自从在VS code中使用PHP intelephense扩展后,它无法找到全局辅助函数,如view()app()resolve()等。
它们被标记为例如Undefined function 'App\Http\Controllers\Web\view'.intelephense(1010)

然而,代码仍然正常运行。
有人知道如何解决这个问题吗?

英文:

I recently updated my laravel project from 9.x to 10.x.
Ever since the PHP intelephense extension in VS code is not able to find the global helper functions like view(), app(), resolve(), ... .
They get marked down as with for example Undefined function 'App\Http\Controllers\Web\view'.intelephense(1010).

However the code still functions as normal.
Does anyone know how to fix this?

答案1

得分: 0

我通过laracats找到了一个答案:
我需要禁用、重新加载并启用intelephense扩展。

英文:

I found an answer through laracats:
I had to disable, reload and enable the intelephense extension.

huangapple
  • 本文由 发表于 2023年7月31日 18:20:37
  • 转载请务必保留本文链接:https://go.coder-hub.com/76802667.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定