title: Eloquent Laravel 5 - Many to many relation with multi column with Mongodb
body: <p>I use: Laravel mongodb (<a href="https://github.com/jenssegers/laravel-mongodb" rel="nofollow">https://github.com/jenssegers/laravel-mongodb</a>)</p>
  
  <p>I have table relation in MySQL</p>
  
  <p>table: <em>apps</em></p>
  
  <pre><code>ID
  Name
  </code></pre>
  
  <p>table: <em>clients</em></p>
  
  <pre><code>ID
  Name
  </code></pre>
  
  <p>And table relationship: <em>app_client</em></p>
  
  <pre><code>app_id
  client_id
  version
  </code></pre>
  
  <p>field '<em>version</em>' in table <em>app_client</em> is string type</p>
  
  <p><strong>How to create relational tables in MongoDB as containing the <em>version</em> column?</strong></p>
  
  <p>I create table in Mongodb:
  table: <em>apps</em></p>
  
  <pre><code>ID
  Name
  client_ids =&gt; is array: [ObjectID('client_id'), ObjectID('client_id')]
  </code></pre>
  
  <p>table: <em>clients</em></p>
  
  <pre><code>ID
  Name
  app_ids =&gt; is array: [ObjectID('app_id'), ObjectID('app_id')]
  </code></pre>
  
  <p>My Eloquent (Model Client):</p>
  
  <pre><code>public function apps(){
      return $this-&gt;belongsToMany('Model\App', null, 'client_ids', 'app_ids');
  }
  </code></pre>
  
  <p>But, not column <em>version</em>
  Do you know what I mean? How to create column <em>version</em> in database mongodb for Eloquent? </p>