Skip to content

Commit

Permalink
fix cache tab, support laravel>=5.4 event system (barryvdh#680)
Browse files Browse the repository at this point in the history
  • Loading branch information
adelf authored and barryvdh committed Jul 25, 2017
1 parent edf7236 commit bc8e142
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/DataCollector/CacheCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,16 @@ public function __construct($requestStartTime = null, $collectValues)
$this->collectValues = $collectValues;
}

public function onClassEvent($event)
public function onClassEvent($name, $event = null)
{
if(is_object($name)) {
$event = $name;
}

if(is_array($event)) {
$event = $event[0];
}

$class = get_class($event);
if (isset($this->classMap[$class])) {
$params = [];
Expand Down

0 comments on commit bc8e142

Please sign in to comment.