spatie / laravel-ray

Debug with Ray to fix problems faster in Laravel apps
https://myray.app
MIT License
291 stars 64 forks source link

Add conditional query watcher and convenience methods for update, delete, insert and select queries #359

Open patrickomeara opened 4 months ago

patrickomeara commented 4 months ago

When I'm writing migrations or commands that change a lot of data I often want to see just the write queries, or just the updates or deletes, depending on what the context is. But the queries I want to see are usually amongst 10s to 100s times as many queries that I don't want to see. The execution slows down and Ray struggles to then filter through so many payloads.

This PR allows the user to conditionally send queries based on the query itself, no longer bogging down Ray or littering the UI with pointless queries.

Additionally I have added convenience methods around insert, select, update and delete queries, all of which can be turned on in the config.

SlowQueryWatcher is a great example of what ConditionalQueryWatcher can be used for.

freekmurze commented 4 months ago

Very nice!

Could you also send a PR to our docs (which can be found here: https://github.com/spatie/myray.app/tree/main/docs/php/laravel)

patrickomeara commented 3 months ago

Looks like I don't have access to that repo @freekmurze. Seem like the improve this page links on https://myray.app/docs/getting-started/introduction are broken as well.

image
patrickomeara commented 3 months ago

Just checking in here @freekmurze, I'm happy to write the docs up when possible.

freekmurze commented 3 months ago

Could you add docs for this too? Thanks!

patrickomeara commented 3 months ago

I don't have access to the docs repo you shared @freekmurze, is it available elsewhere?

patrickomeara commented 1 month ago

Circling back on this @freekmurze, I don't have access to the docs repo you provided. I'm happy to provide docs when possible.