idea-php-laravel-plugin
idea-php-laravel-plugin copied to clipboard
navigating from route to controller not working
In the latest version of PHPstorm 2019.1, the route in web.php that can locate and jump to a controller for a while suddenly becomes unusable again. Failure indicates that the class was not found. Reinstalling the plugin and restarting phpstorm will work again, but it will fail again after a while. I have no choice but to lower the version of Phpstorm. Now it is the version of 2018.3, and it works normally in this version. I hope this problem can be solved soon.
Environmental information in case of problems:
- MacOS mojave 10.14.4
- laravel 5.5 lts
- php7.3
I'm having the same problem after updating PHPStorm to 2019.1. Code completion works, but code navigation does not.
Screen recording

Environment
macOS 10.14.4 PhpStorm 2019.1 Laravel Plugin v0.15.2 Laravel 5.8
It appears this issue was closed due to the workaround found here: https://github.com/barryvdh/laravel-ide-helper/issues/708#issuecomment-484984972
It started to go wrong again, sometimes it worked, sometimes it didn't.
Restart a few times inexplicably began to work again。
Laravel Framework 5.5.45
"barryvdh/laravel-ide-helper": "^2.4",
PHP 7.2.13 (cli) (built: Dec 7 2018 10:41:23) ( NTS ) PhpStorm 2019.1.2 Build #PS-191.7141.52, built on May 8, 2019 JRE: 1.8.0_202-release-1483-b49 x86_64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o macOS 10.14.4
它又开始出错了,有时它会起作用,有时则没有。
重启几次莫名其妙地再次开始工作。
Laravel Framework 5.5.45
“barryvdh / laravel-ide-helper”:“^ 2.4”,
PHP 7.2.13(cli)(建于:2018年12月7日10:41:23)(NTS) PhpStorm 2019.1.2 Build#PS-191.7141.52,建于2019年5月8日 JRE:1.8.0_202-release-1483- b49 x86_64 JVM:JetBrains的OpenJDK 64位服务器虚拟机sro macOS 10.14.4
me too
laravel 5.7 laravel-ide-helper 2.6.2
After the v0.15.4 update of this idea-php-laravel-plugin broke my code navigation functionality again, this is what got it working again for me:
- In the project root, delete _ide_helper.php
- Run
php artisan ide-helper:generateto create a fresh new _ide_helper.php - Open project Preferences dialog, then go to Languages & Frameworks -> PHP -> Laravel
- Uncheck "Enable plugin for this project" and click Apply
- Check "Enable plugin for this project" and click Apply
- Close Preferences dialog, code navigation now working as expected again
@sblomberg I did the same thing and it worked.
Sometimes it just doesn't work out.
Sometimes re-opening will fail.
Sometimes when a new window opens on another project, both items fail.
When multiple Windows open a new item, one failure transient causes another failure.
Same issue here. Work-around ( removing IDE-helper file) didn't work. Anything else worth trying ?
Same issue here. Work-around ( removing IDE-helper file) didn't work. Anything else worth trying ?
@fvrdam I have given up the new version and returned to 2018.3
Same issue here Phpstorm 2019.2
Me too. And all of my controller methods report as unused. I don't know if this is a plugin or PHPStorm issue, but every iteration of PHPStorm costs more and delivers less.
Same issue with 2019.2. Now my functions in Controller display as "Unused element". I have tired re-enable the Laravel plugin, Symphony plugin, and cleared cache, cleared compiled and regenerate the ide helper.
I've also had this issue, I think since the first 2019 release.
Reverting to 2018.3 fixes it immediately and allows navigation from Route to Controller.
Any updates on this? Having exactly the same problem.
@sblomberg it's 2019.3 and problem's still there. But your solution works. Thank you. o/
I have the same issue and none of the solutions worked.
Late to the party but when I had this issue, I used invaldiate caches and restart and that fixed it for me. This was for 2020.1
To be clear, PHPSTORM File | Invalidate Caches / Restart is meant.
You need to get the Laravel Idea Plugin paid version to enable that. Here is the link for it.
https://plugins.jetbrains.com/plugin/13441-laravel-idea
NB: You can also try it for free for 30 days before purchasing
You need to get the Laravel Idea Plugin paid version to enable that. Here is the link for it.
https://plugins.jetbrains.com/plugin/13441-laravel-idea
NB: You can also try it for free for 30 days before purchasing
I'm using the free Laravel Plugin with PHPStorm 2020.1 and it works, but sometimes you need to do some "maintenance" as invalidate caches, enable and disable de plugin, regenerate de ide helper, etc.
Before finding this branch I thought that this problem is unique to my setup / environment. Same problem. Sometimes randomly stops /start working.
I am having this issue on PhpStorm 2021.3.2 Cannot click through to the controllers from the Routes file. I have tried all the solutions including the paid plugin. I have found that adding the code below allowed it to work.
/** @routeNamespace("App\Http\Controllers") */
MacBook air bigSur Laravel 9