Or is there a better way to do this?
Oct 31, 2019
6
Level 2
Quiz questions
I'm developing a quiz application, I want to be able to randomize the question such that two person taking the same quiz will not see similar questions. Tried doing that using laravel shuffle and also paginated it. Each time I make a request for the next question, it reorders the questions again making it difficult to answer the questions orderly. Please, is there a way i can randomize ones and maintain that same random state though the quiz process?
Level 102
Sorry meant the first parameter. Like this
$shuffled = $questions->shuffle(auth()->user()->id);
Each user will get their questions shuffled the same way each time
2 likes
Please or to participate in this conversation.