src/Watchers/ModelWatcher.php
public function recordAction($event, $data)
    {
        if (! Telescope::isRecording() || ! $this->shouldRecord($event)) {
            return;
        }

        $model = FormatModel::given($data[0]);

        $changes = $data[0]->getChanges();

        Telescope::recordModelEvent(IncomingEntry::make(array_filter([
            'action' => $this->action($event),
            'model' => $model,
            'changes' => empty($changes) ? null : $changes,
        ]))->tags([$model]));
    }
public function recordAction($event, $data)
    {
        if (! Telescope::isRecording() || ! $this->shouldRecord($event)) {
            return;
        }

        $model = FormatModel::given($data[0]);

        $changes = $data[0]->getChanges();

        Telescope::recordModelEvent(IncomingEntry::make(array_filter([
            'action' => $this->action($event),
            'model' => $model,
            'changes' => empty($changes) ? null : $changes,
        ]))->tags([$model]));
    }
public function recordAction ( $ event , $ data ) { if ( ! Telescope :: isRecording ( ) || ! $ this -> shouldRecord ( $ event ) ) { return ; } $ model = FormatModel :: given ( $ data [ 0 ] ) ; $ changes = $ data [ 0 ] -> getChanges ( ) ; Telescope :: recordModelEvent ( IncomingEntry :: make ( array_filter ( [ 'action' => $ this -> action ( $ event ) , 'model' => $ model , 'changes' => empty ( $ changes ) ? null : $ changes , ] ) ) -> tags ( [ $ model ] ) ) ; }
Record an action.

@param  string  $event
@param  array  $data
@return void
Record an action .