|
@@ -190,7 +190,7 @@ class CompanyRepository extends BaseRepository
|
|
|
if (!Schema::hasColumn($this->model->getTable(), $key)) {
|
|
|
return true;
|
|
|
}
|
|
|
- if ($this->model->withTrashed()->where($key, $value)
|
|
|
+ if ($this->model->withTrashed()->where($key, $value)->whereRaw('deleted_at is null')
|
|
|
->when($id>0, function ($query) use ($id) {
|
|
|
return $query->where('id', '<>', $id);
|
|
|
})->first()) {
|