Skip to content

Commit

Permalink
fixed import has row model relation issue
Browse files Browse the repository at this point in the history
  • Loading branch information
CihanSenturk committed Jan 2, 2024
1 parent 3af29e9 commit a014c3d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/Abstracts/Import.php
Expand Up @@ -234,10 +234,12 @@ public function hasRow($row)
// This query should be used if there is no deleted_at field in the table or if the deleted data is to be retrieved.
return $this->model::withTrashed()->get($this->columns)->each(function ($data) {
$data->setAppends([]);
$data->unsetRelations();
});
} else {
return $this->model::get($this->columns)->each(function ($data) {
$data->setAppends([]);
$data->unsetRelations();
});
}
});
Expand Down

0 comments on commit a014c3d

Please sign in to comment.