Creating a dashboard application
In an application, you can have multiple kinds of data stored in multiple tables.
Typically, on the product list page, you have to retrieve a list of products by executing a query to retrieve products.
Or, in a dashboard, maybe you could show multiple charts or tables to show some data from your database. If you want to show more charts on the same page, you have to perform more than one query on more than one table.
You might execute one query at a time; this means that the total time for retrieving all the useful information for composing the dashboard is the sum of the execution times of all the queries involved.
Running more than one query at the same time would reduce the total time to retrieve all the information.
To demonstrate this, we will create an events
table where we will store some events with a timestamp for the user.
Creating an events table
When you are creating a table in Laravel, you have to use a migration file...