title: laravel foreach loop only storing last element of array in db table
body: <p>i have function in my controller that uses php excel to read rows from excel file, and store it to db table.</p>
  
  <pre><code>public function processData(Request $request)
  {
      /* store data from form in to variables */
      $hotel = $request-&gt;input('hotel');
      $date = $request-&gt;input('date');
      $start_row = $request-&gt;input('row');
      $date_col = $request-&gt;input('date-col');
      $sold_col = $request-&gt;input('sold-col');
      $rev_col = $request-&gt;input('rev-col');
  
      /* get tables name */
      $table = str_replace('-', '_', $hotel);
      $monthly_table = $table . '_monthly';
  
      /* init hotel class */
      $hotel_table = new Hotel($table);
  
      $file = public_path().'/'.$date.'.xls';
  
      $sheetData = Excel::load($file)-&gt;noHeading()-&gt;getExcel()-&gt;getSheet()-&gt;toArray(null,false,false, true);
      $sheetData = array_slice($sheetData, $start_row - 1);
  
      foreach ($sheetData as $row)
      {
          if ($this-&gt;isDate($row[$date_col]))
          {
              print $row[$date_col] . "---" . $row[$sold_col] . "---" . gettype(money_format('%i', floatval($row[$rev_col]))) . "&lt;br&gt;";
              $hotel_table-&gt;date = $row[$date_col];
              $hotel_table-&gt;sold = intval($row[$sold_col]);
              $hotel_table-&gt;sold_diff = 0;
              $hotel_table-&gt;rev = floatval($row[$rev_col]);
              $hotel_table-&gt;rev_diff = 0;
              $hotel_table-&gt;row = $start_row;
              $hotel_table-&gt;date_col = $date_col;
              $hotel_table-&gt;sold_col = $sold_col;
              $hotel_table-&gt;rev_col = $rev_col;
              //$hotel_table-&gt;save();
              if (!$hotel_table-&gt;save())
              {
                  dd ( DB::getQueryLog() );
              }
  
          }
      }
  
  }
  
  public function isDate($date)
  {
      if (date('m/d/Y', strtotime($date)) == $date)
      {
          return true;
      }
      else
      {
          return false;
      }
  }
  </code></pre>
  
  <p>this is my table </p>
  
  <pre><code>Schema::create($tableName, function (Blueprint $table) {
              $table-&gt;increments('id');
              $table-&gt;string('date');
              $table-&gt;integer('sold');
              $table-&gt;integer('sold_diff');
              $table-&gt;float('rev');
              $table-&gt;float('rev_diff');
              $table-&gt;string('row');
              $table-&gt;string('date_col');
              $table-&gt;string('sold_col');
              $table-&gt;string('rev_col');
              $table-&gt;timestamps();
          });
  </code></pre>
  
  <p>when i go thru the foreach its printing things just fine to the screen there are no errors, but when i look at the table it only has last element of the array in db table.</p>