Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow query filter method added #1146

Merged
merged 1 commit into from
Nov 15, 2021
Merged

Conversation

MishukAdhikari
Copy link
Contributor

To filter slow query it looks like

Telescope::filter(function (IncomingEntry $entry) {

    return $entry->type === EntryType::QUERY && ($entry->content['slow'] ?? false);

});

If we use method it's much more readable and easy to add multiple or

Telescope::filter(function (IncomingEntry $entry) { 
    return $entry->isSlowQuery();
});

@taylorotwell taylorotwell merged commit ce9e6b5 into laravel:4.x Nov 15, 2021
MishukAdhikari added a commit to MishukAdhikari/docs that referenced this pull request Nov 17, 2021
As this PR has been merged I think it's better to add the method in documentation so it will be easier for developers to find it.


laravel/telescope#1146
taylorotwell pushed a commit to laravel/docs that referenced this pull request Nov 17, 2021
As this PR has been merged I think it's better to add the method in documentation so it will be easier for developers to find it.


laravel/telescope#1146
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants