Cara menemukan data di baris lain dengan 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