title: How to Merge Two Eloquent Collections?
body: <p>I have a questions table and a tags table. I want to fetch all questions from tags of a given question. So, for example, I may have the tags "Travel," "Trains" and "Culture" attached to a given question. I want to be able to fetch all questions for those three tags. The tricky, so it seems, is that questions and tags relationship is a many-to-many defined in Eloquent as belongsToMany.</p>
  
  <p>I thought about trying to merge the questions Collections as below:</p>
  
  <pre><code>foreach ($question-&gt;tags as $tag) {
      if (!isset($related)) {
          $related = $tag-&gt;questions;
      } else {
          $related-&gt;merge($tag-&gt;questions);
      }
  }
  </code></pre>
  
  <p>It doesn't seem to work though. Doesn't seem to merge anything. Am I attempting this correctly? Also, is there perhaps a better way to fetch a row of rows in a many-to-many relationship in Eloquent?</p>