HasDescriptionType
Adds description getter/setter for the current type. The description is passed to trans() when getting.
Namespace
JobMetric\Typeify\Traits\HasDescriptionType
Methods
description(string $description): static
Set the description for the current type (translation key or literal text).
$postType->define('blog')->description('Posts for the blog section');
Throws: TypeifyTypeNotMatchException when no type is selected.
getDescription(): string
Get the description for the current type (run through trans()).
$postType->type('blog');
$description = $postType->getDescription();
Throws: TypeifyTypeNotMatchException when no type is selected.