plugin
plugin copied to clipboard
[Feature Request]: Support for Laravel Actions
Feature Description
Hello,
I've been using the plugin for a few months and it has made my work in PhpStorm with Laravel much easier.
However, since I started using Laravel Actions I notice that there is no support here yet.
Is there a plan to add support for the Actions from this package, as there is for other third party packages such as Nova. Due to the structure of the Actions traits (asJob, asCommand) I think it shouldn't be that challenging to integrate this.
Thanks a lot Thomas
Hello. What kind of support do you mean?
Hey @adelf, thanks for your reply! I'd be happy to elaborate.
This is how Laravel Actions are described in their documentation:
Instead of creating controllers, jobs, listeners, etc., you can create a PHP class that does a specific task and run that class as an arbitrary class.
Actions can be used as an object, controller, job, listener, command or faker. Therefore, it would be very helpful if the Idea Helper recognizes as what type my action is created and then at the entsrpechenden places where Autocomplete would otherwise just suggest me a method in a controller or a job, then suggests the appropriate action.
Example: in web.php when assigning routes, Autocomplete shows all controllers with their methods: if all actions with the "asController" trait would be shown here, that would be very helpful.
Furthermore, yes, the plugin has a generator for new files: again, it would be great if you could create a new action and select the traits to use and so the corresponding methods would be created directly in the action.
Finally, it would also be helpful within an action to store the available methods that are inherited by autocomplete to see what options I have.
The documentation gives some very good examples and explanations: if you have understood the usage and functionality of the actions, this will also result in useful applications for the plugin.
Maybe we can compile the useful functions here, in addition to my explanations.
Best regards Thomas
Do you need any more information or can you be helped in any other way to move this feature request forward?
Thanks! Thomas
Hello. What kind of support do you mean?
On Sun, Jul 10, 2022, 19:08 Thomas @.***> wrote:
Feature Description
Hello,
I've been using the plugin for a few months and it has made my work in PhpStorm with Laravel much easier.
However, since I started using Laravel Actions https://laravelactions.com/ I notice that there is no support here yet.
Is there a plan to add support for the Actions from this package, as there is for other third party packages such as Nova. Due to the structure of the Actions traits (asJob, asCommand) I think it shouldn't be that challenging to integrate this.
Thanks a lot Thomas
— Reply to this email directly, view it on GitHub https://github.com/laravel-idea/plugin/issues/581, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVQCWSRO7NMYZAKBZS4E5LVTLROTANCNFSM53FEZMDA . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Basically, my point is:
- Autocompletion e.g. in the Routes, that here the actions are indicated.
- When I create a new action, that I am asked if it should be created as Command, Job, ... and then the corresponding methods are already in the file.
- if actions are used as job, that e.g. dispatch() also suggests the actions
Finally it would also be great if I could right click (or shortcut) in the action to "Add new functions to the action" so that e.g. with a function "Add Validation" the corresponding methods getValidator() etc. would be added automatically.
@devmoath: Can you add your suggestions to the list?
Is there an update on the current status?
if actions are used as job, that e.g. dispatch() also suggests the actions
You mean this?
The dispatch()
topic is probably the least important and related to the corresponding facade.
I am mainly concerned with the wizard when I create new actions (https://share.cleanshot.com/BNVVYmPK).
An action can be used
- As object
- As controller
- As job
- As listener
- As command
Here it would be nice if I could select this accordingly in the dialogue and the corresponding use AsJob
statements could be built in directly in the newly created action.
If I now create an action as a job, for example, I have the following functions to choose from that I can use in my action to control it: https://laravelactions.com/2.x/as-controller.html#routes
It would be nice if I now had the possibility in the source code of this action that these methods are now suggested to me directly or I could add them via a wizard - as required.
Do you understand what I mean? Otherwise, take a few screenshots...
So, you prefer using AsJob
and other traits instead of one AsAction
?
If you have any hints on what should be added to the action class code by each checkbox, excluding the last one, I'll be happy) I don't use this package, so I could make wrong decisions here...
https://twitter.com/laravel_idea/status/1706280815171076316
Looks stunning, and like a real improvement!I will next week times a detailed feedback 😊Am 25.09.2023 um 15:52 schrieb Adel @.***>: https://twitter.com/laravel_idea/status/1706280815171076316
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>
Implemented in 7.4