【发布时间】:2020-03-27 17:06:21
【问题描述】:
在我今天获得 PHP Intelephense 的最新更新后,intelephense 一直为我的路线(以及其他类)显示一个未定义符号的错误,以前没有这样的错误,这让我很困扰。
这是错误截图:
这是我的代码:
Route::group(['prefix' => 'user', 'namespace' => 'Membership', 'name' => 'user.'], function () {
Route::get('profile', 'ProfileController@show')->name('profile.show');
Route::patch('profile', 'ProfileController@update')->name('profile.update');
Route::patch('change-password', 'ChangePasswordController@change')->name('change-password');
Route::get('role', 'ProfileController@getRole')->name('profile.role');
Route::get('summary', 'SummaryController@show')->name('summary');
Route::get('reserved', 'AuctionController@reservedAuction')->name('reserved');
});
实际上这段代码没有错误,但是 intelephense 一直显示错误,有没有办法解决这个问题?
【问题讨论】:
-
我在应用程序的问题队列中报告了一个问题 - github.com/bmewburn/vscode-intelephense/issues/885
-
如果您在
api.php的 Route 上遇到未定义的错误,请参阅下面的 @user12483351 的答案。那为我修好了。我在 Intelephese 1.3.6 上。
标签: php laravel visual-studio-code