title: Laravel, copy row to another table with eloquent relationship
body: <p>I want to get the data form database table and create a new row in another table.
  Which 1 PO have many PoProducts.</p>
  
  <pre><code>    $_getPO = Order::find($id);
      $_getPOProducts= OrderProducts::where('order_id', $id)-&gt;get();
  
      $order_no = $_getPO-&gt;order_no;
      $eta = $_getPO-&gt;eta;
  
      $_Order = new DeliveryOrders();
      $_Order-&gt;order_no = $order_no;
      $_Order-&gt;eta = $eta;
      $_Order-&gt;save();
  
      $POProduct = array();
      foreach($_getPOProducts as $i =&gt; $_getPOProduct)
      {
          $POProduct[] = new DeliveryOrderProducts();
          $POProduct[] = $_getPOProduct-&gt;order_id;
          $POProduct[] = $_getPOProduct-&gt;item_id;
          $POProduct[] = $_getPOProduct-&gt;qty;
          $POProduct-&gt;save();
      }
  </code></pre>
  
  <p>But, this output an error.</p>
  
  <pre><code>   Call to a member function save() on array
  </code></pre>
  
  <p>Please help me. Thanks.</p>