Haehnchen / idea-php-laravel-plugin

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

Support route name completion for groups #98

Open GregorVoelkl opened 7 years ago

GregorVoelkl commented 7 years ago

Currently there is the feature to complete route names like

Route::get('/login', 'Administration\Auth\LoginController@showLoginForm') ->name('loginForm');

For the name autocompetion is supported in functions like route('loginForm');

It would be nice to support this in Route Groups, that use the 'as' Parameter like in

Route::group(['prefix' => 'administration', 'as' => 'admin::'], function () {
       Route::get('dashboard', 'AdminController@dashboard')
            ->name('dashboard')
});

The autocmpletion only proposes 'dashboard' but should propose 'admin::dashboard'

mostafamaklad commented 4 years ago

Any Updates for this issue

mostafamaklad commented 4 years ago

I think this is working now but could you check this

// this is working
Route::group(['as' => 'admin.'], static function() {
    Route::resource('seasons', 'Admin\SeasonsController')->except('show', 'destroy');
});

// this is not working but it is the same as the previouse one
Route::name('admin.')->group(static function() {
    Route::resource('seasons', 'Admin\SeasonsController')->except('show', 'destroy');
});