title: Laravel : Explode array with relation belongsTo to model
body: <p>I want to explode array value and have successfully doing so by using this code :</p>
  
  <pre><code>@foreach(explode('.', $comment-&gt;topic_id) as $topic)
      {{ $topic }}
  @endforeach
  </code></pre>
  
  <p>This is the output</p>
  
  <pre><code>Topic : 1,2
  </code></pre>
  
  <p>The problem is, I want to implement relation belongsTo to the <code>topic_id</code>. When I add the relation and run the code, unfortunately only one of the value is shown.</p>
  
  <pre><code>@foreach(explode('.', $comment-&gt;getTopic-&gt;topic) as $topic)
      {{ $topic }}
  @endforeach
  </code></pre>
  
  <p>This is my model</p>
  
  <pre><code>public function getTopic()
  {
      return $this-&gt;belongsTo('App\Topic', 'topic_id', 'id');
  }
  </code></pre>
  
  <p>Output : </p>
  
  <pre><code>Topic : Laravel
  </code></pre>
  
  <p>What is the right way to call this array? Please help me. Thank you.</p>