title: How to get the ID (auto increment) of a record about to be uploaded?
body: <p>I am using Laravel 3. I have a form, and 2 tables. One table has an AUTO INCREMENT ID and I want to give this ID to the second table. eg.</p>
  
  <p>table1</p>
  
  <p>ID: Auto increment<br>
  title:</p>
  
  <p>text:</p>
  
  <p>date:</p>
  
  <p>table2</p>
  
  <p>ID: Auto increment
  t1_ID: table1->ID</p>
  
  <p>text:  </p>
  
  <p>Is it possible somehow?
  I think I can get the ID of the last record in table1 and add 1 to it in the controller, but maybe there is an easier way.</p>