英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论