laravel-idea / plugin

Laravel Idea plugin for PhpStorm
https://laravel-idea.com/
177 stars 7 forks source link

[Feature Request] Route names completion in JavaScript #207

Closed Daanra closed 3 years ago

Daanra commented 3 years ago

The route names completion functionality is awesome!

I think it would be even better if it could be extended to JavaScript / Vue files. I personally use Ziggy to get a JavaScript route function that behaves very similar to Laravel's route function.

I also inject this as a global function in my Vue instance such that I can use it like so:

<a :href="$route('users.index')">Click me</a>

I think adding the option to have route names completion for JavaScript functions would be a great addition :smile:

adelf commented 3 years ago

I think adding the option to have route names completion for JavaScript functions would be a great addition

Agree )

hailwood commented 3 years ago

When implementing this, an option to say what method name should be considered a route method would be great.

That would deal with something like import laravelRoute from 'my-route-package';

adelf commented 3 years ago

It should work in the 4.4 version. Full list of changes - https://laravel-idea.com/blog/2021/4-4-release

Please write here if something isn't working.