title: Laravel 5.0 get the id of the row inserted in a pivot table after attach
body: <p>I have a newsletter and block model that has a many to many relation. When I attach a block to a newsletter I want the id of the row that was insterted in the pivot table.</p>
  
  <p>This is what I tried but results in "null"</p>
  
  <pre><code>$newsletter = Newsletter::findOrFail($newsletterId);
  $newsletterBlock = $newsletter-&gt;blocks()-&gt;attach($blockId);
  dd($newsletterBlock);
  </code></pre>