We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c855d90 commit 1cdae4cCopy full SHA for 1cdae4c
src/Flynsarmy/CsvSeeder/CsvSeeder.php
@@ -225,7 +225,7 @@ public function readRow( array $row, array $mapping )
225
$row_values[$dbCol] = NULL;
226
}
227
else {
228
- $row_values[$dbCol] = $row[$csvCol];
+ $row_values[$dbCol] = $this->should_trim ? trim($row[$csvCol]) : $row[$csvCol];
229
230
231
@@ -245,7 +245,7 @@ public function readRow( array $row, array $mapping )
245
public function insert( array $seedData )
246
{
247
try {
248
- DB::table($this->table)->insert($this->should_trim ? trim($seedData) : $seedData);
+ DB::table($this->table)->insert($seedData);
249
} catch (\Exception $e) {
250
Log::error("CSV insert failed: " . $e->getMessage() . " - CSV " . $this->filename);
251
return FALSE;
0 commit comments