title: BelongsToMany relation. How to get unique rows
body: <p>I have next <code>'member_companies'</code> table in DB:</p>
  
  <p><a href="https://i.stack.imgur.com/hRqFr.png" rel="noreferrer"><img src="https://i.stack.imgur.com/hRqFr.png" alt="enter image description here"></a></p>
  
  <p>And in model Member has a relation :</p>
  
  <pre><code>public function companies()
  {
      return $this-&gt;belongsToMany(Company::class, 'member_companies');
  }
  </code></pre>
  
  <p>And it return me all companies with dublicates. For example, <code>Member::find(238)-&gt;companies-&gt;pluck('id')</code> return  </p>
  
  <pre><code>[
    6,
    5,
    7,
    2,
    10,
    8,
    4,
    13,
    14,
    10,
    8,
    13
  ]
  </code></pre>
  
  <p>But I want only unique items. Like </p>
  
  <pre><code>[
      6,
      5,
      7,
      2,
      10,
      8,
      4,
      13,
      14,
  ]   
  </code></pre>
  
  <p>How can I do it with eloquent relations?</p>