From 4061acf0c5857dab6d45cec644ffd0db3186cd45 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 31 May 2019 08:02:36 -0500 Subject: [PATCH] formatting --- telescope.md | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/telescope.md b/telescope.md index c906e72c34..66eef7333c 100644 --- a/telescope.md +++ b/telescope.md @@ -10,7 +10,6 @@ - [Entries](#filtering-entries) - [Batches](#filtering-batches) - [Tagging](#tagging) - - [Adding custom tags](#adding-custom-tags) - [Available Watchers](#available-watchers) - [Cache Watcher](#cache-watcher) - [Command Watcher](#command-watcher) @@ -186,15 +185,10 @@ While the `filter` callback filters data for individual entries, you may use the ## Tagging -Telescope allows searching on specific tags to get a better detailed overview. +Telescope allows you to search entries by "tag". Telescope automatically tags many entries; however, you may occasionally want to attach custom tags to entries. To accomplish this, you may use the `Telescope::tags` method, which accepts a callback that should return an array of tags. These tags will be merged with any tags Telescope automatically attaches to the entry. Typically, you should call the `tags` method within your `TelescopeServiceProvider`: - -### Adding custom tags + use Laravel\Telescope\Telescope; -You can add custom tags that will give you more insights via the `tags` callback that you can register in your `TelescopeServiceProvider`. - -Here is a small example that adds the request response status as a tags which you can search on. - /** * Register any application services. * @@ -203,10 +197,10 @@ Here is a small example that adds the request response status as a tags which yo public function register() { $this->hideSensitiveRequestDetails(); - + Telescope::tags(function (IncomingEntry $entry) { if ($entry->type === 'request') { - return ['status: ' . $entry->content['response_status']]; + return ['status:'.$entry->content['response_status']]; } return [];