Open birendragurung opened 7 years ago
@birendragurung could you provide part of the code from routes/web.php ?
And also versions of IDE and plugin.
Laravel plugin 0.9.1 PhpStorm 10.0.2
Sorry, but current version of plugin is 0.14.2... And routing was refactored a lot. And I think the last version works ok there.
Now i've updated the plugin. But still my get routes are not navigating to associated controller methods..
Its a long time but i just faced the same issue. In my case i forgot to activate the plugin for the current Project
I have a similar issue.
Had the same issue, just go in the plugin settings and set the router namespace ie: \App\Http\Controllers
@kiwina Doesn't seem to work neither with \App\Http\Controllers
or any other permutation.
@azdanov have you installed ide-helper and made artisan ide-helper:generate?
@adelf I did. Although there are some issues as I've mentioned in https://github.com/barryvdh/laravel-ide-helper/issues/704.
I asked because I saw that get method is highlighted as unknown. Thats the reason. This plugin autocompletes the get, post and other methods of Route class.
I see. Guess it's an issue with barryvdh/laravel-ide-helper.
This way is not supported?
<?php
use Illuminate\Support\Facades\Route;
Route::get('/', 'HomeController@index');
There is a workaround as mentioned in https://github.com/barryvdh/laravel-ide-helper/issues/708#issuecomment-422837744. Not ideal, but it enables on click navigation in routes.
After change _ide_helper.php
class Route extends \Illuminate\Support\Facades\Route {}
to
class Route extends Illuminate\Support\Facades\Route {}
Just remove the slash \
, and restart phpStorm , it works for me .
But I don't understand why.
The method mentioned by @wensonsmith didn't help. Is there any way to resolve this issue?
add this: use Illuminate\Support\Facades\Route;
Route::get('/show', 'IndexController@show');
add this: use Illuminate\Support\Facades\Route;
Route::get('/show', 'IndexController@show');
That's a band-aid, not a solution
bootstrap/compiled.php has to be cleared first, so run php artisan clear-compiled before generating.
php artisan clear-compiled then, php artisan ide-helper:generate
Did anyone find a long-lasting solution to this? Sometimes my IDE navigates, sometimes it doesn't.
Did anyone find a long-lasting solution to this? Sometimes my IDE navigates, sometimes it doesn't.
Same problem that i facing rigtht now.. sometime restart phpstorm also not the solution
Well, I got to upload some plug-ins: "Laravel", "Laravel Snippets" and "LaravelStorms". This worked for me. Hope was useful.
I've tried all options suggested here and it does not work. PhpStorm 2020.1 "laravel/framework": "^6.7", "barryvdh/laravel-ide-helper": "^2.6.7",
Try with composer install
or npm install
I don't remember setting this up in the past but it worked for me now.
@btxtiger Did add the Router Namespace? That fixed it for me.
@adampatterson Geat!!! Finally adding the Router Namespace worked! I'm also generating helpers using
php artisan ide-helper:generate && php artisan ide-helper:meta && php artisan ide-helper:models -N
if that helps anyone.
I have a grouped routes in my
web.php
file. I use Phpstorm and used laravel plugin along with laravel-ide-helper. The issue arises when I want to navigate to thecontroller method
directly from myroute declarations
, but this is not working in my ide. Sometimes the controller methods withget routes
can be navigated and sometimes only thepost routes
get navigated. But in this moment, neither of the routes are can be navigated to the controller methods. Is there any mistake that are making this inconsistency in my IDE helper?