How to get all Taxonomy Term attached to Node? The Node has attached two terms.



Term::load($node-&gt;get('field_posts_category')-&gt;target_id); only returns first item. How to get all Taxonomy Term attached to Node?
Use the method referencedEntities() to get all terms:

$terms = $node-&gt;field_posts_category-&gt;referencedEntities();