From 1c410b0a95fc9a764874c3e93c820e7a03a52f79 Mon Sep 17 00:00:00 2001 From: = Date: Fri, 16 Jul 2021 22:00:21 +1000 Subject: [PATCH] Minor fixes --- app/Jobs/Util/Import.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/Jobs/Util/Import.php b/app/Jobs/Util/Import.php index ae106823298f..43a0e525a5ac 100644 --- a/app/Jobs/Util/Import.php +++ b/app/Jobs/Util/Import.php @@ -558,14 +558,12 @@ class Import implements ShouldQueue { $value = trim($value); - $model_query = (new $model()) - ->query() - ->where($column, $value) - ->where('company_id', $this->company->id) - ->exists(); + $model_query = $model::where($column, $value) + ->where('company_id', $this->company->id) + ->exists(); if($model_query) - return $value.'_'. Str::random(5); + return $value . '_' . Str::random(5); return $value; }