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

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners