public function validateRequest(IlluminateRequest $request)
{
$passed = false;
foreach ($this->validators as $validator) {
$validator = $this->container->make($validator);
if ($validator instanceof Validator && $validator->validate($request)) {
$passed = true;
}
}
// The accept validator will always be run once any of the previous validators have
// been run. This ensures that we only run the accept validator once we know we
// have a request that is targeting the API.
if ($passed) {
$this->container->make(Accept::class)->validate($request);
}
return $passed;
}