So finden Sie Daten in einer anderen Zeile mit Laravel-Excel
class CustomImport implements ToModel, WithHeadingRow{
use Importable;
public $lastRow;
public function model(array $row){
$this->lastRow = Data::create([
'name' => $row['name'],
'previousRowId' => isset($this->lastRow->id) : $this->lastRow->id ? null
]);
}
}
SAMER SAEID