title: how to use Laravel Eloquent push() function?
body: <p>I am struggling to use laravel <code>push()</code> function</p>
  
  <p>My Code is here:</p>
  
  <pre><code>$company = new Company(array('name' =&gt; 'Company 1'));
  $company-&gt;persons[] = new Person(array('name' =&gt; 'Company 1 Person 1', 'mobile' =&gt; 12345));
  $company-&gt;persons[] = new Person(array('name' =&gt; 'Company 1 Person 2', 'mobile' =&gt; 112233));
  $company-&gt;push();
  </code></pre>
  
  <p>When it gets stored:
  Company gets stored well, but for company persons, it stores <code>company_id</code> to <code>0</code></p>
  
  <p>Larave Documentations says:</p>
  
  <blockquote>
    <p>Sometimes you may wish to save not only a model, but also all of its
    relationships. To do so, you may use the push method:</p>
  </blockquote>
  
  <pre><code>$user-&gt;push();
  </code></pre>
  
  <p>what is wrong?</p>