问题
We have quite a lot routes, such as:
Route::get('/','WebController@index');
When I want to jump to function, I have to:
- go to the class
WebController
- go to the function
index()
Is it possible jump to function from routes definition in one step?
回答1:
You should have to install plugin for laravel in php strom. - Under Settings (Preferences) | Plugins, click the Browse repositories... button and search for Laravel. Next, we can use the Install plugin button or the context menu to proceed with plugin installation. Restart the IDE to complete the installation of the plugins. Next, we will have to enable the Laravel Plugin in our project. We can do this from Settings (Preferences) | Other Settings | Laravel Plugin | Enable Plugin for this Project. We'll have to restart the IDE once more to load the plugin's additional features for Laravel. Refrence: https://confluence.jetbrains.com/display/PhpStorm/Laravel+Development+using+PhpStorm
回答2:
- Install Laravel Plugin for PHPstorm (Settings -> Plugins -> Laravel)
- Active it per Project (Settings > Languages & Frameworks > PHP > Laravel)
- Use "Laravel IDE Helper Generator": https://github.com/barryvdh/laravel-ide-helper
来源:https://stackoverflow.com/questions/49645290/laravel-phpstorm-is-it-possible-jump-to-function-from-routes-definition-in-on