Commit 958c104a authored by Jack Stupple's avatar Jack Stupple

fix random ordering on questions

parent 5f785213
......@@ -12,7 +12,13 @@ class CharacterQuestionController extends Controller
$player = get_player($request);
return \App\Character::where('id', $player->character_id)
->with(['questions', 'questions.questionCategory', 'questions.options', 'questions.options.modifiers', 'questions.options.modifiers.modifierCategory'])
->where('language_id', $player->language_id)->firstOrFail()->questions;
\ No newline at end of file
......@@ -14,7 +14,7 @@ class Question extends Model
public function options()
return $this->hasMany(\App\Answer::class)->orderBy('id', 'RAND()');
return $this->hasMany(\App\Answer::class)->orderByRaw('RAND()');
public function characters()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment