title: Any advantages of adding an id column to a pivot table in Laravel?
body: <p>Is there any advantages of having an id column in a pivot table (many to many relationship) in Laravel (i'm using version 5.1)?</p>
  
  <p>With an id</p>
  
  <pre><code>        $table-&gt;increments('id');
  
          $table-&gt;integer('appointment_id')-&gt;unsigned();
          $table-&gt;foreign('appointment_id')-&gt;references('id')-&gt;on('appointments')-&gt;onDelete('cascade');
  
          $table-&gt;integer('client_id')-&gt;unsigned();
          $table-&gt;foreign('client_id')-&gt;references('id')-&gt;on('clients')-&gt;onDelete('cascade');
  
          $table-&gt;timestamps();
  </code></pre>
  
  <p>Without an id</p>
  
  <pre><code>        $table-&gt;integer('appointment_id')-&gt;unsigned();
          $table-&gt;foreign('appointment_id')-&gt;references('id')-&gt;on('appointments')-&gt;onDelete('cascade');
  
          $table-&gt;integer('client_id')-&gt;unsigned();
          $table-&gt;foreign('client_id')-&gt;references('id')-&gt;on('clients')-&gt;onDelete('cascade');
  
          $table-&gt;timestamps();
  </code></pre>