How to load paragraph entity on node object? I'm using paragraphs in my content type. I've created a paragraph type and added content. Now I want to load the paragraphs in a foreach. But nothing's showing up. $paras is empty:

$node  = \Drupal\node\Entity\Node::load(1);
$paras = $node-&gt;get('field_paragraph')-&gt;referencedEntities();
$paragraph = $node-&gt;field_paragraph-&gt;getValue();
// Loop through the result set.
foreach ( $paragraph as $element ) {
  $p = \Drupal\paragraphs\Entity\Paragraph::load( $element['target_id'] );
  $text = $p-&gt;field_name-&gt;getValue();
}