public function logActivity($event)
    {
        // if cronjob / no user
        if (user()->id <= 0) {
            return;
        }

        // log adjustment
        LogAdminActivity::create([
            'subject_id'   => $this->id,
            'subject_type' => get_class($this),
            'name'         => $this->getActivityName($this, $event),
            'before'       => $this->before,
            'after'        => $this->after,
            'user_id'      => user()->id,
        ]);
    }
public function logActivity($event)
    {
        // if cronjob / no user
        if (user()->id <= 0) {
            return;
        }

        // log adjustment
        LogAdminActivity::create([
            'subject_id'   => $this->id,
            'subject_type' => get_class($this),
            'name'         => $this->getActivityName($this, $event),
            'before'       => $this->before,
            'after'        => $this->after,
            'user_id'      => user()->id,
        ]);
    }
public function logActivity ( $ event ) { // if cronjob / no user if ( user ( ) -> id <= 0 ) { return ; } // log adjustment LogAdminActivity :: create ( [ 'subject_id' => $ this -> id , 'subject_type' => get_class ( $ this ) , 'name' => $ this -> getActivityName ( $ this , $ event ) , 'before' => $ this -> before , 'after' => $ this -> after , 'user_id' => user ( ) -> id , ] ) ; }
Record activity for the model.

@param  string $event
@return void
Record activity for the model .