title: How to insert data into two tables in mysql - Laravel
body: <p>I want to insert data into two tables of mysql, </p>
  
  <p>Tables are as follows:</p>
  
  <p>1) t_entity_details
  2) t_preferences</p>
  
  <p>Columns inside the table are as follows:</p>
  
  <p><strong>t_entity_details</strong></p>
  
  <pre><code>- Entity_id (primary key, auto-increment)
  - First_Name
  - Sex
  - TagLine
  - Personal_Desc
  - DOB
  - Lang
  </code></pre>
  
  <p><strong>t_preferences</strong></p>
  
  <pre><code>- Entity_id (primary key too, No auto-increment)
  - other columns......
  </code></pre>
  
  <p>Now when I submit a form, the Entity_id should be same in both the tables. So how to do that?
  Please help me with this.</p>