title: Laravel 4.2 replicate including child items
body: <p>I tried to replicate the rows but without results, I get orders replicate without the corresponding items.</p>
  
  <pre><code>ORDERS pk(id) auto increment
  id       total       status       date
  -----+-------------+-----------+-------------
  118      899.58        2          2015-03-03 00:18:58
  119      38.55         2          2015-03-03 00:18:58
  
  
  ITEMS pk(order_id,product_id) corresponding items childs:
  order_id    product_id    quantity
  ----------+-------------+----------
  118         1115          82 
  119         8965          12      /// ro replicate
  
  
  $idnew = Order::find($idorder)-&gt;replicate()-&gt;save(); // create new OK
  $idnewId = $idnew-&gt;id;/////obtain id of last insert  
  $itemstemp = DB::table('item')-&gt;where('order_id', '=' ,$idnewId)-&gt;get();
  
             foreach($itemstemp as $itemte){
              DB::table('item')-&gt;insert(array(
                  'order_id'   =&gt; $itemte-&gt;order_id, 
                  'product_id' =&gt; $itemte-&gt;product_id,
                  'quantity'   =&gt; $itemte-&gt;quantity
                  )); 
              }
  </code></pre>
  
  <p>Response ErrorExceptionTrying to get property of non-object
  line $idnewId = $idnew->id;</p>
  
  <p>Desired Output:</p>
  
  <pre><code>ORDERS pk(id)
  id       total       status       date
  -----+-------------+-----------+-------------
  118      899.58        2          2015-03-03 00:18:58
  119      38.55         2          2015-03-03 00:18:58
  120      38.55         2          2015-03-03 00:18:58
  
  ITEMS pk(order_id,product_id) corresponding items childs:
  order_id    product_id    quantity
  ----------+-------------+----------
  118         1115          82 
  119         8965          12  
  119         2255          22
  120         8965          12  
  120         2255          22  
  </code></pre>
  
  <p>Any ideas please</p>