title: Eloquent insert id with sequence next value
body: <p>I would like to create a new record in a PostgreSQL database table with Laravel eloquent but the table id is not auto incremented and it's make my life more difficult.</p>
  
  <p>Here is the sample structure:</p>
  
  <pre><code>CREATE TABLE billing (
     id int8,
     companyname varchar(255) NOT NULL,
     ...
     PRIMARY KEY (id),
  );
  </code></pre>
  
  <p>The <strong>id</strong> field isn't auto incremented and I can't change this. Furthermore I can't write triggers.</p>
  
  <p>In Laravel I would like to do something like this:</p>
  
  <pre><code>$billing = new Billing;
  
  $billing-&gt;id = DB::raw("nextval('sequence')");
  $billing-&gt;companyname = $request-&gt;companyname;
  // ...
  
  $billing-&gt;save();
  </code></pre>
  
  <p>It's working but it seems messy.</p>
  
  <p>How could I simplify the <strong><em>DB</em></strong> (id) part of my code?</p>
  
  <p>Thanks!</p>