diff --git a/src/DataCollector/QueryCollector.php b/src/DataCollector/QueryCollector.php index 941647ec..00da5bfa 100644 --- a/src/DataCollector/QueryCollector.php +++ b/src/DataCollector/QueryCollector.php @@ -298,6 +298,14 @@ protected function findSource() $sources = []; foreach ($stack as $index => $trace) { + if (($trace['class'] ?? null) == 'Yajra\DataTables\Services\DataTable') { + $reflector = new \ReflectionClass(get_class($trace['object'])); + $sources[] = $this->parseTrace($index, [ + 'class' => $reflector->getName(), + 'file' => $reflector->getFileName(), + ]); + } + $sources[] = $this->parseTrace($index, $trace); }