Sfoglia il codice sorgente

更新招考系统报名逻辑

sandm 1 anno fa
parent
commit
bc0ba212a2
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      app/Repositories/CompanyRepository.php

+ 1 - 1
app/Repositories/CompanyRepository.php

@@ -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()) {