whereIn($primaryId, $value); } else { $_model = $model::query()->where(['t1.' . $primaryId => $value]); } $this->value = is_array($value) ? json_encode($value,JSON_UNESCAPED_UNICODE) : $value; $this->_relation = $relation->bindIdentification($model . '_' . $primaryId . '_' . $this->value, $_model); $this->model = $model; } /** * @param $name * @return mixed */ public function __get($name): mixed { if (empty($this->value)) { return null; } return $this->get(); } }