If you can get it all in one query that is often prefered.
Just remember to keep your controllers slim :)
https://reinink.ca/articles/dynamic-relationships-in-laravel-using-subqueries
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
hello. I want to show types of data in statistics page of website. for instance I want to show a list of latest orders, summary or all orders including total sales, groups sales based on monthes, new users, best selling products and maybe event some other sort of information. my quistion is that is it okay to query them all in my controller method and sent them to view? because I feel these may be to many queries? please guide.
If you can get it all in one query that is often prefered.
Just remember to keep your controllers slim :)
https://reinink.ca/articles/dynamic-relationships-in-laravel-using-subqueries
Please or to participate in this conversation.