We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b61f401 + fe7fb05 commit 837f2a9Copy full SHA for 837f2a9
src/DataCollector/ModelsCollector.php
@@ -24,7 +24,7 @@ public function __construct(Dispatcher $events)
24
25
$events->listen('eloquent.*', function ($event, $models) {
26
if (Str::contains($event, 'eloquent.retrieved')) {
27
- foreach ($models as $model) {
+ foreach (array_filter($models) as $model) {
28
$class = get_class($model);
29
$this->models[$class] = ($this->models[$class] ?? 0) + 1;
30
}
0 commit comments