Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Laravel 8 - suggest Controller Actions #56

Open
DarkStoorM opened this issue Aug 6, 2021 · 0 comments
Open

Feature Request: Laravel 8 - suggest Controller Actions #56

DarkStoorM opened this issue Aug 6, 2021 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@DarkStoorM
Copy link

Would it be possible to get extra intellisense on the new routing syntax?

Currently, it autocompletes the entire ClassName@Action

obraz

With the new syntax, maybe it could pick up a list of available controller actions while triggering the intellisense inside an array, which is the second parameter:

Route::get('/', [IndexController::class, 'index'])->name('index');
                                             ^ here

The current behavior could stay the same while triggering it with the old syntax (outside the array), but behave differently while inside the array.

If the first parameter in the array is, for example, PostsController::class which has methods, like: show / edit / update / delete / etc. the intellisense could suggest only those actions. It would perform a lookup on this class only and list available actions or maybe it could autocomplete the full class name + action (new syntax) while triggering inside the array, when selecting it from the list:

obraz

which results in inserting two parameters SessionsController::class, 'destroy' into the current array

Route::get('/', [SessionsController::class, 'destroy']);

Maybe an auto-import of the selected controller would also be nice.

@amir9480 amir9480 added enhancement New feature or request help wanted Extra attention is needed labels Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants