does it take ages to load? Are the users complaining that it's almost unusable?.

Of course, your website might be slow for a lot of reasons, but one of the most common reasons is slow database queries.

Fortunately, in laravel, we can define a callback that gets called every time a query gets executed (see https://laravel.com/docs/8.x/database#listening-for-query-events).

And the best part is that the first item in the collection is the exact place where we triggered the SQL query.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners