title: AJAX data uploading but not storing in database
body: <p>please help me! i'm uploading multiple data with ajax request and data is uploading and i get response 200 OK but there's no data stored into database. here's my store method.</p>
  <pre><code>$data = json_decode($request[&quot;final_json&quot;], true);
  $data_to_insert = [];
          
          foreach($data as $request){ 
              
                  $data_to_insert = [
                   'office_name' =&gt; $request['office_name'],
                   'registration_number' =&gt; $request['registration_number'],
                   'owner' =&gt; $request['owner_name'],
                   'father_name' =&gt; $request['father_name'],
                   'address' =&gt; $request['address'],
                   'vehicle_class' =&gt; $request['vehicle_class'],
                   'insurance_type' =&gt; $request['insurance_type'],
                   'insurance_company_name' =&gt; $request['insurance_company_name'],
                   'insurance_from' =&gt; $request['insurance_from'],
                   'insurance_up_to' =&gt; $request['insurance_up_to'],
                   'policy_number' =&gt; $request['policy_number'],
                  ];
            }
         DB::table('owners')-&gt;updateOrInsert(['chasis_number' =&gt; $request['chasis_number']], $data_to_insert);
  
  </code></pre>
  <p>request is complete and it takes time too depending how much data i upload but in database there's not a single row get inserted.</p>