Idk if this should be here or not, but Idk where to ask or what to read. There are a ton of opinions online about this.
How should I organize my controllers? Rn I have, something like this.
Controller "UserIndexController" which call a service "UserIndexService" just to get the props to send to the view
$this->viewService = new UserIndexService();
return Inertia::render(
"UserIndex",
$this->viewService->getViewData()
);
But, if let's say I need to create (it is more complex than User::create) a user or do something else with it, I have a UserService for it.
It is this a good design? I was reading about actions but Idk how to implement them when I need to get the view data. Is having something like UserIndexGetDataAction a good idea or not? But Idk if it helps me, cuz UserIndexService has two public functions instead of one which I need to call in different places of my app. It is ok to combine both actions and services in my case? Or should I stick with services only?