Taxonomy

Statamic\API\Taxonomy


Get all taxonomies.

Taxonomy::all(); // Returns \Illuminate\Support\Collection

Get the handles of all taxonomies.

Taxonomy::handles(); // Returns an array of strings

Get a taxonomy by handle.

Taxonomy::whereHandle($handle); // Returns TaxonomyFolder

Check if a taxonomy exists.

Taxonomy::handleExists($handle); // Returns a boolean

Import using:

use Statamic\API\Taxonomy