getData(); if(isset($validatorData['type'])) $type = $validatorData['type']; $user = User::query()->whereCrypt('phone', $phone)->where('type', $type); // uid 가 있다면 자신은 제외 if(isset($validatorData['uid'])) { $uid = $validatorData['uid']; $user->where('uid', '<>', $uid); } $count = $user->count(); return $count == 0; } }