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