Skip to content

Commit 2d059d1

Browse files
authored
Use const instead of plain text (#10843)
1 parent 0476b4b commit 2d059d1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

telescope.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ public function register(): void
249249
Telescope allows you to search entries by "tag". Often, tags are Eloquent model class names or authenticated user IDs which Telescope automatically adds to entries. Occasionally, you may want to attach your own custom tags to entries. To accomplish this, you may use the `Telescope::tag` method. The `tag` method accepts a closure which should return an array of tags. The tags returned by the closure will be merged with any tags Telescope would automatically attach to the entry. Typically, you should call the `tag` method within the `register` method of your `App\Providers\TelescopeServiceProvider` class:
250250

251251
```php
252+
use Laravel\Telescope\EntryType;
252253
use Laravel\Telescope\IncomingEntry;
253254
use Laravel\Telescope\Telescope;
254255

@@ -260,7 +261,7 @@ public function register(): void
260261
$this->hideSensitiveRequestDetails();
261262

262263
Telescope::tag(function (IncomingEntry $entry) {
263-
return $entry->type === 'request'
264+
return $entry->type === EntryType::REQUEST
264265
? ['status:'.$entry->content['response_status']]
265266
: [];
266267
});

0 commit comments

Comments
 (0)