Haehnchen / idea-php-laravel-plugin

Laravel Framework Plugin for PhpStorm / IntelliJ IDEA
MIT License
572 stars 108 forks source link

Route name auto complete doesn't work for grouped Routes #235

Open Sartoric opened 5 years ago

Sartoric commented 5 years ago

Similar and probably related to #98

PhpStorm 2019.1.2 PhpStorm 2019.1.3

For grouped routes, autocomplete doesn't show the prefixed name, so there could be possible issues with homonymous routes.

eg. Route::get('admin/login', 'Auth\LoginController@showLoginForm')->name('login'); Route::name('frontend.')->group(function () { Route::get('/login', 'Auth\Frontend\LoginController@showLoginForm')->name('login'); // other routes }

adelf commented 5 years ago

Currently plugin doesn’t support ::name methods. Only group method parameters are supported. ‘as’ or ‘prefix’ I don’t remember...

Sartoric commented 5 years ago

Yep forgot to mention that this works now Route::group(['as' => 'frontend.'], function () {})

I'm just listing this issue due to the latest Laravel docs https://laravel.com/docs/5.8/routing#route-group-prefixes

sergeByishimo commented 5 years ago

also auto completing overridden resource names doesn't work

Route::resource('photos', 'PhotoController')->names([ 'create' => 'photos.build' ]);