public function save()
    {
        $data = $this->getData();

        if (config('visitlog.unique')) {
            $model = VisitLogModel::where('ip', $this->getUserIP())->first();

            if ($model) {
                // update record of same IP eg new visit times, etc
                $model->touch();
                return $model->update($data);
            }
        }

        return VisitLogModel::create($data);
    }
public function save()
    {
        $data = $this->getData();

        if (config('visitlog.unique')) {
            $model = VisitLogModel::where('ip', $this->getUserIP())->first();

            if ($model) {
                // update record of same IP eg new visit times, etc
                $model->touch();
                return $model->update($data);
            }
        }

        return VisitLogModel::create($data);
    }
public function save ( ) { $ data = $ this -> getData ( ) ; if ( config ( 'visitlog.unique' ) ) { $ model = VisitLogModel :: where ( 'ip' , $ this -> getUserIP ( ) ) -> first ( ) ; if ( $ model ) { // update record of same IP eg new visit times, etc $ model -> touch ( ) ; return $ model -> update ( $ data ) ; } } return VisitLogModel :: create ( $ data ) ; }
Saves visit info into db.

@return mixed
Saves visit info into db .