title: How to create composite key in ORM Eloquent Laravel 6.2
body: <p>I would like create a composite key between two table in my database. I have find how to create that in migration but for Eloquente ORM I have found nothing. </p>
  
  <p>So here is my migration :</p>
  
  <pre class="lang-php prettyprint-override"><code>Schema::create('passages', function (Blueprint $table) {
              $table-&gt;unsignedBigInteger('id_contract');
              $table-&gt;integer('month');
              $table-&gt;integer('year');
              $table-&gt;text('object');
              $table-&gt;integer('nbPassage');
              $table-&gt;decimal('priceExclTax');
              $table-&gt;timestamps();
  
              $table-&gt;foreign('id_contract')-&gt;references('id')-&gt;on('contracts');
              $table-&gt;primary(['id_contract','mois','annee']);
  });
  </code></pre>
  
  <p>So I have try to make in model a belong relationship, but when i try to save my object nothing append, and I don't have anny row in my DataBase. So I think this is the wrong way.</p>
  
  <p>If you have an idea please help me ^^.</p>