emptyRow
This commit is contained in:
parent
375fc5ade5
commit
f65ca6610f
@ -34,15 +34,24 @@ class ImportService extends Service
|
||||
} else {
|
||||
$row = [];
|
||||
foreach ($item as $key => $value) {
|
||||
$emptyRow = true;
|
||||
|
||||
$column = strtolower($title[$key]);
|
||||
|
||||
if ($columns === null || in_array($column, $columns)) {
|
||||
$row[$column] = trim($value);
|
||||
|
||||
if(!empty($row[$column])){
|
||||
$emptyRow = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!$emptyRow){
|
||||
array_push($data, $row);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user