title: Getting the id of inserted row in Laravel
body: <p>Here is my code:</p>
  
  <pre><code>User::create([
      'name' =&gt; $request-&gt;name,
      'email' =&gt; $request-&gt;email,
      'cell_phone' =&gt; $request-&gt;cell_phone,
      'province_id' =&gt; $request-&gt;province,
      'city_id' =&gt; $request-&gt;city,
      'job' =&gt; $job,
      'company' =&gt; $company,
      'member_num' =&gt; $member_num,
  ]);
  </code></pre>
  
  <p>As you know, it inserts a new row in the database. Now I need to get the <code>id</code> of inserted row. How can I get that?</p>
  
  <hr>
  
  <p>Noted that I know, <a href="https://stackoverflow.com/a/21084888/2805376">I can do the same if I use <code>$obj-&gt;save()</code>, and the id will be <code>$obj-&gt;id;</code></a>. But I want to know how can I do that when I'm using <code>create()</code>.</p>