protected static function addGuest($ip, $url)
    {
        $activity = static::find()->where(['ip' => $ip, 'user_id' => null])->limit(1)->one();
        if (empty($activity)) {
            $activity = new static;
            $activity->ip = $ip;
        }
        $activity->url = $url;
        return $activity->save();
    }
protected static function addGuest($ip, $url)
    {
        $activity = static::find()->where(['ip' => $ip, 'user_id' => null])->limit(1)->one();
        if (empty($activity)) {
            $activity = new static;
            $activity->ip = $ip;
        }
        $activity->url = $url;
        return $activity->save();
    }
protected static function addGuest ( $ ip , $ url ) { $ activity = static :: find ( ) -> where ( [ 'ip' => $ ip , 'user_id' => null ] ) -> limit ( 1 ) -> one ( ) ; if ( empty ( $ activity ) ) { $ activity = new static ; $ activity -> ip = $ ip ; } $ activity -> url = $ url ; return $ activity -> save ( ) ; }
Adds guest activity.
@param string $ip
@param string $url
@return bool
@since 0.6
Adds guest activity .