public function getTermsAttribute()
{
$taxonomies = $this->taxonomies;
$terms = [];
foreach ($taxonomies as $taxonomy) {
$taxonomyName = $taxonomy['taxonomy'] == 'post_tag' ? 'tag' : $taxonomy['taxonomy'];
$terms[$taxonomyName][$taxonomy->term['slug']] = $taxonomy->term['name'];
}
return $terms;
}