Already a member? Sign in and enjoy.
I love using actions, but I feel this package goes too far and, in a way, violates the MVC pattern. Once you start using Actions "As Controllers", then the "C" in "MVC" is no longer useful. I love to call actions from Controller classes, and not replace the controllers themselves. Just my opinion and preference :)
I kinda feel the same way. How it looks now is that you take a perfectly good controller and convert it to an action just for the sake of being able to use actions everywhere. I (still) fail to see what's the benefit.
And I can use simple PHP class as an action and call it from a controller :)
In a recent project I worked on, we used Inertia.js, but also have to implement an API for a mobile front end later on. So Actions were useful because the Web Controllers could be used to handle Inertia requests / responses, while API controllers can be created to serve the mobile endpoints. But both Web and API controller call the same Actions. So the core logic is somewhat centralised in the actions. Found it to be very useful that way. But I wouldn't use a Action as a Controller.
So what exactly did you get from using this package in comparison to just create plain PHP Class and handle method in it?
O no, I did not use this package. I used a generic PHP class with a static method called run. So I basically call my class as in SomeAction::run()