diff --git a/src/ValidatingTrait.php b/src/ValidatingTrait.php index 80cf642..8b0d60e 100644 --- a/src/ValidatingTrait.php +++ b/src/ValidatingTrait.php @@ -136,20 +136,7 @@ public function getModel() */ public function getModelAttributes() { - $attributes = $this->getModel()->getAttributes(); - - foreach ($attributes as $key => $value) { - // The validator doesn't handle Carbon instances, so instead of casting - // them we'll return their raw value instead. - if (in_array($key, $this->getDates()) || $this->isDateCastable($key)) { - $attributes[$key] = $value; - continue; - } - - $attributes[$key] = $this->getModel()->getAttributeValue($key); - } - - return $attributes; + return $this->getModel()->attributesToArray(); } /**