TermFactory
Statamic\Data\Taxonomies\TermFactory
Inheritance: ContentFactory
Usage
Create a TermFactory
using the API class. You should pass the slug into the create
method.
$factory = Statamic\API\Term::create('my-term');
Available Methods
taxonomy
Specify the taxonomy, as a string.
$factory->taxonomy('tags');
Import using:
use Statamic\Data\Taxonomies\TermFactory