Adjust class file controller
This commit is contained in:
@@ -45,15 +45,10 @@ class ImportCSVFileJob implements ShouldQueue
|
||||
'name' => $row[$mapping['name']],
|
||||
'translation' => $row[$mapping['translation']],
|
||||
);
|
||||
//Word::updateOrCreate(
|
||||
// [
|
||||
// 'name' => $row[$mapping['name']],
|
||||
// 'translation' => $row[$mapping['translation']],
|
||||
// ]
|
||||
//);
|
||||
}
|
||||
DB::table('words')->upsert($finalarray, 'name', 'translation');
|
||||
//fclose($fileStream);
|
||||
//Storage::delete($this->filepath);
|
||||
//insert multy-record in DB
|
||||
DB::table('words')->upsert($finalarray, 'name');
|
||||
//delete file from storage after upsert
|
||||
Storage::delete('new_file.csv');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user