lorisleiva / laravel-actions

⚡️ Laravel components that take care of one specific task
https://laravelactions.com
MIT License
2.52k stars 125 forks source link

Support controllers with explicit methods #123

Closed lorisleiva closed 3 years ago

lorisleiva commented 3 years ago

See #110

Wulfheart commented 3 years ago

Is this feature documented yet?

lorisleiva commented 3 years ago

No it's a good point but I'm not sure this is the sort of behaviour we should encourage for Laravel Actions since you end up with multiple actions within the same class. But it is definitely something that should work if they try it so that's why I made the fix. Do you think we should document it still?

Wulfheart commented 3 years ago

But especially for showing a form and handling that it would be really awesome.

lorisleiva commented 3 years ago

Alrighty, I'll add something on the guide page. 🙂

Wulfheart commented 3 years ago

But we could also discuss if there is or should be a better way to handle this use case?

lorisleiva commented 3 years ago

I've written this: https://laravelactions.com/2.x/register-as-controller.html#routes-with-explicit-methods

And I've just made sure my note at the bottom is correct haha.

Do you mean you'd like to mention alternative ways to handle the show/process forms duality? Like using ShowX actions as I mentioned on issue #110?

Wulfheart commented 3 years ago

Oh yes. This one is gold.

lorisleiva commented 3 years ago

Documentation updated 👌