Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

clm075hk's avatar

Telescope filter POST or PUT request only

I want to save POST or PUT request and the related SQL, Cache, etc. However, the Get request and the related will not save.

How to set the filter in the Telescope register step?

/**
 * Register any application services.
 *
 * @return void
 */
public function register()
{
    $this->hideSensitiveRequestDetails();

    Telescope::filter(function (IncomingEntry $entry) {
        if ($this->app->isLocal()) { // update this statement or remove it entirely
            return true;
        }

        return $entry->isReportableException() ||
            $entry->isFailedJob() ||
            $entry->isScheduledTask() ||
            $entry->hasMonitoredTag();
    });
}
0 likes
2 replies
bobbybouwmann's avatar

I'm not sure what you're trying to achieve here.

You want to log all incoming POST AND PUT requests? I don't understand what GET has to do with this.

clm075hk's avatar

Yes, I want incoming POST AND PUT requests and the SQL. Exclude Get requests and SQL However, the default will filter out all information.

Please or to participate in this conversation.