title: Laravel Unable to copy contents of one database into another
body: <p>I'm not sure how to go about this. I have a working table that I manipulate data on to match the rest of our database, and a published table that I want to transfer the finalized data onto. Although <code>truncate()</code> performs and clears out the <code>Report</code> table, the <code>Prescription</code> table remains empty after this runs. Is this some sort of Eloquent issue that I'm not understanding?</p>
  
  <p>Here is my code:</p>
  
  <pre><code>// call working table
  $reports = Report::orderBy('id', 'asc');
  
  // loop through every working report and save as a new prescription
  foreach ($reports as $report) {
      $prescription = new Prescription();
      $prescription-&gt;script_id = $report-&gt;script_id;
      $prescription-&gt;medication = $report-&gt;medication;
      $prescription-&gt;fill_date = $report-&gt;fill_date;
      $prescription-&gt;type = $report-&gt;type;
      $prescription-&gt;quantity = $report-&gt;quantity;
      $prescription-&gt;supply = $report-&gt;supply;
      $prescription-&gt;insurance = $report-&gt;insurance;
      $prescription-&gt;rx_number = $report-&gt;rx_number;
      $prescription-&gt;copay = $report-&gt;copay;
      $prescription-&gt;tr = $report-&gt;tr;
      $prescription-&gt;cogs = $report-&gt;cogs;
      $prescription-&gt;fees = $report-&gt;fees;
      $prescription-&gt;ncr = $report-&gt;ncr;
      $prescription-&gt;save();
  }
  
  // truncate working table
  $reports-&gt;truncate();
  
  // return
  $message = 'All records transferred to prescriptions table.';
  return redirect('reports')-&gt;with('success', $message);
  </code></pre>