ソースを参照

更新答题错误

郑晓宇 6 年 前
コミット
73630f3489
共有1 個のファイルを変更した1 個の追加3 個の削除を含む
  1. 1 3
      app/Home/Controllers/GameController.php

+ 1 - 3
app/Home/Controllers/GameController.php

@@ -45,9 +45,7 @@ class GameController extends Controller
         }else{
             $questions_id = [];
             foreach ($questions as $k => $v) {
-                // $response['info'] = $v;
-                $questions_id[] = $v['question'];
-                $response['ext'] = $questions_id;
+                $questions_id[] = $v->question->question_id;
             }
             // $questions_id = array_column($questions, 'question_id');
             $question = Question::inRandomOrder()->select('question_id','title')->where("is_released",1)->whereNotIn("question_id", $questions_id)->first();