diff --git a/src/Fields/WorkflowBadge.php b/src/Fields/WorkflowBadge.php index 0443de4..47d2a32 100644 --- a/src/Fields/WorkflowBadge.php +++ b/src/Fields/WorkflowBadge.php @@ -22,6 +22,15 @@ public function __construct($name, $className) $this->labels($className::statusLabels()); } + public function limit($limit = 5) + { + foreach ($this->labels as $key => $value) { + $this->labels[$key] = \Str::limit($value, $limit); + } + + return $this; + } + /** * The built-in badge types and their corresponding CSS classes. *