headers->has('Precognition-Validate-Only')) { return $rules; } return Collection::make($rules) ->only(explode(',', $this->header('Precognition-Validate-Only'))) ->all(); } /** * Determine if the request is attempting to be precognitive. * * @return bool */ public function isAttemptingPrecognition() { return $this->header('Precognition') === 'true'; } /** * Determine if the request is precognitive. * * @return bool */ public function isPrecognitive() { return $this->attributes->get('precognitive', false); } }