Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 1 addition & 14 deletions src/ValidatingTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

/**
Expand Down