I use this query to get a list of data from database and then display it using datatable. However, the query take longer time to load the data before converted to datatable. This application is built in laravel 5.
$itemregistrations = DB::table('itemregistrations')
->join('sections', 'itemregistrations.sectionid', '=', 'sections.sectionid')
->join('categories', 'itemregistrations.categoryid', '=', 'categories.categoryid')
->join('operasi', 'itemregistrations.operasiid', '=', 'operasi.operasiid')
->select('itemregistrations.*', 'sections.sectionname', 'categories.categoryname', 'operasi.operasiname')
->get();
How to reduce loading time to display the output? Before this I use pagination and it works..However i cannot using paginate when using datatable as it doesn't search through all the queries when using paginate. It will only search on the first page of pagination.
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2SzFW8i
via IFTTT
Aucun commentaire:
Enregistrer un commentaire