浏览代码

话题数

wzq 5 年之前
父节点
当前提交
dc85bc224a
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      app/Repositories/Post/PostRepository.php

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

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