Skip to content

Commit bc8e142

Browse files
adelfbarryvdh
authored andcommitted
fix cache tab, support laravel>=5.4 event system (barryvdh#680)
1 parent edf7236 commit bc8e142

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/DataCollector/CacheCollector.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,16 @@ public function __construct($requestStartTime = null, $collectValues)
2424
$this->collectValues = $collectValues;
2525
}
2626

27-
public function onClassEvent($event)
27+
public function onClassEvent($name, $event = null)
2828
{
29+
if(is_object($name)) {
30+
$event = $name;
31+
}
32+
33+
if(is_array($event)) {
34+
$event = $event[0];
35+
}
36+
2937
$class = get_class($event);
3038
if (isset($this->classMap[$class])) {
3139
$params = [];

0 commit comments

Comments
 (0)