Answer the question
In order to leave comments, you need to log in
Request one request or many?
There is a table of transactions. It is necessary to build a graph
. The first option is
to make a new request for each day and put it in the graph.
The second option
is to get all the transactions with one request and then divide using the laravel collection.
What is more productive? Many requests or Shipping percent. collection?
Answer the question
In order to leave comments, you need to log in
Three simple rules
1. Forget about performance issues. You can't think of anything smart anyway, and you don't even need to do stupid things
2. Don't invent phenomena that don't exist in nature like "Load a collection"
3. Instead of all these stupid fantasies , learn SQL .
Then the questions "how to get data for the chart" will not arise at all
Make a new request for each day and add it to the schedule
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question