dimanche 1 septembre 2019

How to make Laravel pagination without refresh page

I'm making an online exam and I want to paginate the questions in different pages but the problem is that when I go to the next page the previous answers gone because the page refresh so how can I make the Laravel pagination withou refresh?

running Laravel 5.8

controller code:

$questions = $exam->questions()->paginate(1);
return view('exam.exam',compact('questions','exam'));

$questions = $exam->questions()->paginate(1);
return view('exam.exam',compact('questions','exam'));

view code

   {!! $questions->render() !!}



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire