/home/techb158/ileadtechnology.com/SSM/vendor/laravel/telescope/src/Watchers
NameSizeModeActions
CacheWatcher.php33810644editdlrm
CommandWatcher.php14940644editdlrm
DumpWatcher.php16310644editdlrm
EventWatcher.php44460644editdlrm
ExceptionWatcher.php21960644editdlrm
FetchesStackTrace.php9510644editdlrm
FormatsClosure.php5750644editdlrm
GateWatcher.php20340644editdlrm
JobWatcher.php44240644editdlrm
LogWatcher.php16230644editdlrm
MailWatcher.php26000644editdlrm
ModelWatcher.php16960644editdlrm
NotificationWatcher.php23930644editdlrm
QueryWatcher.php30700644editdlrm
RedisWatcher.php22590644editdlrm
RequestWatcher.php64240644editdlrm
ScheduleWatcher.php21190644editdlrm
ViewWatcher.php49740644editdlrm
Watcher.php5760644editdlrm
Edit: /home/techb158/ileadtechnology.com/SSM/vendor/laravel/telescope/src/Watchers/RedisWatcher.php (2259B)
listen(CommandExecuted::class, [$this, 'recordCommand']); foreach ((array) $app['redis']->connections() as $connection) { $connection->setEventDispatcher($app['events']); } $app['redis']->enableEvents(); } /** * Record a Redis command was executed. * * @param \Illuminate\Redis\Events\CommandExecuted $event * @return void */ public function recordCommand(CommandExecuted $event) { if (! Telescope::isRecording() || $this->shouldIgnore($event)) { return; } Telescope::recordRedis(IncomingEntry::make([ 'connection' => $event->connectionName, 'command' => $this->formatCommand($event->command, $event->parameters), 'time' => number_format($event->time, 2, '.', ''), ])); } /** * Format the given Redis command. * * @param string $command * @param array $parameters * @return string */ private function formatCommand($command, $parameters) { $parameters = collect($parameters)->map(function ($parameter) { if (is_array($parameter)) { return collect($parameter)->map(function ($value, $key) { if (is_array($value)) { return json_encode($value); } return is_int($key) ? $value : "{$key} {$value}"; })->implode(' '); } return $parameter; })->implode(' '); return "{$command} {$parameters}"; } /** * Determine if the event should be ignored. * * @param mixed $event * @return bool */ private function shouldIgnore($event) { return in_array($event->command, [ 'pipeline', 'transaction', ]); } }