src/Watchers/QueryWatcher.php
public function recordQuery(QueryExecuted $event)
    {
        if (! Telescope::isRecording()) {
            return;
        }

        $time = $event->time;

        $caller = $this->getCallerFromStackTrace();

        Telescope::recordQuery(IncomingEntry::make([
            'connection' => $event->connectionName,
            'bindings' => $this->formatBindings($event),
            'sql' => $event->sql,
            'time' => number_format($time, 2),
            'slow' => isset($this->options['slow']) && $time >= $this->options['slow'],
            'file' => $caller['file'],
            'line' => $caller['line'],
        ])->tags($this->tags($event)));
    }
public function recordQuery(QueryExecuted $event)
    {
        if (! Telescope::isRecording()) {
            return;
        }

        $time = $event->time;

        $caller = $this->getCallerFromStackTrace();

        Telescope::recordQuery(IncomingEntry::make([
            'connection' => $event->connectionName,
            'bindings' => $this->formatBindings($event),
            'sql' => $event->sql,
            'time' => number_format($time, 2),
            'slow' => isset($this->options['slow']) && $time >= $this->options['slow'],
            'file' => $caller['file'],
            'line' => $caller['line'],
        ])->tags($this->tags($event)));
    }
public function recordQuery ( QueryExecuted $ event ) { if ( ! Telescope :: isRecording ( ) ) { return ; } $ time = $ event -> time ; $ caller = $ this -> getCallerFromStackTrace ( ) ; Telescope :: recordQuery ( IncomingEntry :: make ( [ 'connection' => $ event -> connectionName , 'bindings' => $ this -> formatBindings ( $ event ) , 'sql' => $ event -> sql , 'time' => number_format ( $ time , 2 ) , 'slow' => isset ( $ this -> options [ 'slow' ] ) && $ time >= $ this -> options [ 'slow' ] , 'file' => $ caller [ 'file' ] , 'line' => $ caller [ 'line' ] , ] ) -> tags ( $ this -> tags ( $ event ) ) ) ; }
Record a query was executed.

@param  \Illuminate\Database\Events\QueryExecuted  $event
@return void
Record a query was executed .