you have to read the docs.. i feel like i would be repeating whats there already...
create relationships in models..
& then reference them here.. a clue: u wud do $category->products() for example to get all products.. to get one you could create another relationship (similar to previous to get all products) but limit it to get just one product
you can you the network tab of chrome/firefox to see how long the page loads - you can also install a package debugbar (google it) and it will tell you how long each query took to run