title: Get the Last Inserted Id Using Laravel Eloquent
body: <p>I'm currently using the below code to insert data in a table:</p>
  
  <pre class="lang-php prettyprint-override"><code>&lt;?php
  
  public function saveDetailsCompany()
  {
      $post = Input::All();
  
      $data = new Company;
      $data-&gt;nombre = $post['name'];
      $data-&gt;direccion = $post['address'];
      $data-&gt;telefono = $post['phone'];
      $data-&gt;email = $post['email'];
      $data-&gt;giro = $post['type'];
      $data-&gt;fecha_registro = date("Y-m-d H:i:s");
      $data-&gt;fecha_modificacion = date("Y-m-d H:i:s");
  
      if ($data-&gt;save()) {
          return Response::json(array('success' =&gt; true), 200);
      }
  }
  </code></pre>
  
  <p>I want to return the last ID inserted but I don't know how to get it.</p>
  
  <p>Kind regards!</p>