__toString(); } if ($attribute instanceof UnitEnum) { return enum_value($attribute); } throw new InvalidArgumentException('Model attribute value is an object but does not have a __toString method.'); } return $attribute; } }