郑晓宇 6 years ago
parent
commit
c51ed9eef4
1 changed files with 2 additions and 1 deletions
  1. 2 1
      app/Home/Controllers/GameController.php

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

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