我不希望望远镜捕获对某些表进行的某些查询。
通过TelescopeServiceProvider上的Telescope :: filter,我可以按$ entry-> type ==='query'进行过滤。
如何过滤表格?
我怎么知道此查询来自哪个表?
我的TelescopeServiceProvider.php
public function register()
{
// Telescope::night();
$this->hideSensitiveRequestDetails();
Telescope::filter(function (IncomingEntry $entry) {
if($entry->type==='query'){
//How do I know which table this query is from?
}
if ($this->app->environment('local')) {
return true;
}
return $entry->isReportableException() ||
$entry->isFailedRequest() ||
$entry->isFailedJob() ||
$entry->isScheduledTask() ||
$entry->hasMonitoredTag();
});
}