public function getVersionModel($version_id) { $version = $this->versions()->where("version_id", "=", $version_id)->first(); if (!is_null($version)) { return $version->getModel(); } return null; }