From a014c3d1bfbe9128bc4ab947be7f0f3f56b5c606 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cihan=20=C5=9Eent=C3=BCrk?= <53110792+CihanSenturk@users.noreply.github.com> Date: Tue, 2 Jan 2024 17:52:04 +0300 Subject: [PATCH] fixed import has row model relation issue --- app/Abstracts/Import.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Abstracts/Import.php b/app/Abstracts/Import.php index 084ea2f9a..3fd43fcf8 100644 --- a/app/Abstracts/Import.php +++ b/app/Abstracts/Import.php @@ -234,10 +234,12 @@ abstract class Import implements HasLocalePreference, ShouldQueue, SkipsEmptyRow // 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(); }); } });