getCasts()[$key];
if (class_exists($castType) and is_subclass_of($castType, Enum::class)) {
$castedValue = new $castType($value);
}
}
return $castedValue;
}
/**
* Determine if the given key is cast using a custom class.
*
* @param string $key
* @return bool
*/
protected function isClassCastable($key)
{
return false;
}
}