Myself and a co-worker have been trying to find the source of the magic behind the ValidatesWhenResolved trait - we assumed it would be in the construct, where it would call $this->validate(), but this isn't the case.
Having searched through the entire Illuminate folder and also the app folder, we cannot find anywhere that this method is called. Can anyone shed some light on how this works?
We are looking to implement similar functionality that calls a method when the type-hinted request is resolved, but it is not a validator
The call to the validate method is registered as ResolvingCallback in the Illuminate\Validation\ValidationServiceProvider (method registerValidationResolverHook).
The callback is triggered in the Container (method fireResolvingCallbacks).
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community