、あなたはそれが、このような小さなディテールに答えるのは難しい尋ねました。
コントローラとモデルを "質問"していると仮定します。ブレードファイルでfor-loopを使用して、必要なものを達成することができます。
class QuestionController extends Controller{
public function showbyQuizId($id){
$questions = Question::where('quiz_id', $id)->get();
return view('question')->with('questions', $questions);
}
}
そして、あなたのブレードファイルquestion.blade.phpため
@foreach($questions as $question)
<h1>{{$question->question}} ?</h1>
<p>Pick from these 4 options</p>
<button>{{$question->choice1}}</button>
<button>{{$question->choice2}}</button>
<button>{{$question->choice3}}</button>
<button>{{$question->choice4}}</button>
@endforeach
そこからあなたが選択したボタンは、サーバーとの正しかったかどうかをテストするために、フォームまたはJavaScriptの設定、およびすることができます次の質問にリダイレクトします。
その他のヘルプが必要な場合は、教えてください。
Eloquentまたはraw SQLを使用していますか?モデル間に関係はありますか?モデルを投稿した方が良いでしょう。 –