title: Laravel: How to add a composite key (2 or more columns) as the $primaryKey in the related model?
body: <p>Name of the primary key column in any model in Laravel framework is <code>id</code></p>
  
  <pre><code>protected $primaryKey = 'id';
  </code></pre>
  
  <p>And I know I can change that default name like this:</p>
  
  <pre><code>protected $primaryKey = 'new_name';
  </code></pre>
  
  <p>My question is: What if I have a composite key (2 or more columns) in the table, how do I add them as the <code>$primaryKey</code>? And do I really have to define them?</p>