У меня есть таблица вопросов и таблица question_options в моей базе данных, и я хочу, чтобы, когда пользователь нажимает кнопку воспроизведения, он видел случайный вопрос из базы данных, чтобы ответить на него, затем нажмите следующую кнопку, и должен появиться другой вопрос.ему, хотя каждый вопрос должен появиться через 30 секунд.мои таблицы:
Schema::create('questions', function (Blueprint $table) {
$table->increments('id');
$table->string('question_text');
$table->integer('points');
$table->integer('temps_reponse');
$table->integer('categories_id')->unsigned();
$table->foreign('categories_id')->references('id')->on('categories');
$table->integer('type_id')->unsigned();
$table->foreign('type_id')->references('id')->on('types');
$table->timestamps();
});
Schema::create('question_options', function (Blueprint $table) {
$table->increments('id');
$table->string('option_one');
$table->string('option_two');
$table->string('option_three');
$table->string('correcte');
$table->integer('question_id')->unsigned()->nullable();
$table->foreign('question_id')->references('id')->on('questions');
$table->timestamps();
});
Может кто-нибудь сказать мне, как решить эту проблему.Любая помощь будет очень признателен, большое спасибо