I had a query in laravel which producing 1128 data lists:
$itemregistrations = DB::table('itemregistrations')
->join('sections', 'itemregistrations.sectionid', '=', 'sections.sectionid')
->join('categories', 'itemregistrations.categoryid', '=', 'categories.categoryid')
->join('operasi', 'itemregistrations.operasiid', '=', 'operasi.operasiid')
->select('itemregistrations.ItemRegistrationID','itemregistrations.name', 'itemregistrations.Nobadan', 'sections.sectionname', 'categories.categoryname', 'operasi.operasiname')
->get();
However, this query loads takes longer time...so is using eloquent relationship will help to speed the loading time? How to connect them using relationship?
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2BE7t1W
via IFTTT
Aucun commentaire:
Enregistrer un commentaire