wzq 5 년 전
부모
커밋
5b9508b839
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      app/Repositories/Post/PostRepository.php

+ 1 - 1
app/Repositories/Post/PostRepository.php

@@ -58,7 +58,7 @@ class PostRepository
         //验证话题
         $topicIds = $this->topic->whereIn('id', explode(',', $request['topic_ids']))->pluck('id')->toArray();
         $topicCount = count($topicIds);
-        if($topicCount == 0 || $topicCount >= 5){
+        if($topicCount == 0 || $topicCount > 5){
             return Response::create([
                 'message'  => '所选话题必须1-5个',
                 'status_code'   => 500