What is the best way for loading large amount of data to view from controller? Or is there better approach than I'm currently doing? I currently have this code on my application. I just got 5k data on a table and it is already slow.
Controller
public function index() {
$questions = Question::paginate();
return view('admin.questions.index', compact(['questions']));
}
View
@foreach ($questions as $question)
// datatable
@endforeach
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire