未定义的类Route(Laravel in PhpStorm)

如何在PHPStorm中修复此警​​报?

还有如何获得路线和其他门面的自动完成?

检查 Laracasts walkthrough

1)转到:https://github.com/barryvdh/laravel-ide-helper

2)点击要点

生成版本为L5:https://gist.github.com/barryvdh/5227822

3)点击“Raw”获得当前版本(截至2016年6月22日)

https://gist.githubusercontent.com/barryvdh/5227822/raw/4d4b0ca26055fa4753b38edeb94fad2396c497c0/_ide_helper.php

4)确保你在你的根目录(这是我的)

cd /var/www/html/project

5)下载要点:

wget https://gist.githubusercontent.com/barryvdh/5227822/raw/4d4b0ca26055fa4753b38edeb94fad2396c497c0/_ide_helper.PHP

6)将“_ide_helper.PHP添加到.gitignore文件

sudo nano .gitignore

底部的新行上添加“_ide_helper.PHP

7)将.gitignore和_ide_helper.PHP文件下载到PHPStorm中

这是我的PHPStorm项目目录之后的样子:

8)将文件下载到PHPStorm中后,“Undefined class”(未定义类)的错误将消失,自动完成将会起作用.可能需要重新启动它.

相关文章

laravel的dd函数不生效怎么办
看不懂laravel文档咋办
安装laravel框架出现command怎么办
Laravel开发API怎么使用事务
laravel怎么构建复杂查询条件
laravel如何实现防止被下载