idea-php-laravel-plugin icon indicating copy to clipboard operation
idea-php-laravel-plugin copied to clipboard

Route name auto complete doesn't work for grouped Routes

Open Sartoric opened this issue 5 years ago • 3 comments

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 }

Sartoric avatar Jun 29 '19 12:06 Sartoric

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

adelf avatar Jun 29 '19 12:06 adelf

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

Sartoric avatar Jun 29 '19 12:06 Sartoric

also auto completing overridden resource names doesn't work

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

sergeByishimo avatar Jul 05 '19 09:07 sergeByishimo