OussamaMater wrote a reply+100 XP
5mos ago
Laravel Service Container: Am I doing the right thing?
Feels a bit overcomplicated if I'm being honest.
I don't have enough context about the rules or whether the order matters, etc. But if you have already created the classes and they all take the same input, you might as well turn them into validation rules and chain them in your validation, like this:
validator($data, rules: [
// .. other request validation rules if they make sense
new CompareMembersValues,
new IdentifyOverlaps,
])->validate();
No need for tags