Found an example
there is a thing in laravel called FormRequest
.
Sometimes, I need extra validation. So I need to use some service there somehow. What options I have
- facade
- service locator via app() global function
- I also have instance of container there via
$this->container
which one is the best here? I suppose instance of container
I can't do constructor injection. Why? Because for me, it seams that there are too many arguments on the __construct
method