__toString(); } if (function_exists('enum_exists') && $attribute instanceof BackedEnum) { return $attribute->value; } throw new InvalidArgumentException('Model attribute value is an object but does not have a __toString method.'); } return $attribute; } }