I'm using Datatables to load data from database. My table has more than 3000 entries which i show on my frontend using datatable. But it take too much time to load data. image showing slow loading of data in datatable
Datatable intialize here:
$(document).ready(function () {
$('.schools').DataTable({
ordering: false,
responsive: true,
columnDefs: [
{responsivePriority: 1, targets: 0},
{responsivePriority: 2, targets: -3},
]
});
})
Laravel code to bring data from database:
public function show()
{
$schools = DB::table('schools')->get();
return view('admin.school.view', compact('schools'));
}