belongsTo('app\\common\\model\\plus\\release\\Tag', 'tag_id', 'tag_id') ->bind(['name']); } public static function getTagId($project_id) { $model = new static; return $model ->where('project_id', '=', $project_id) ->column("tag_id"); } public static function getTagName($project_id) { $model = new static; return $model->with('tag') ->where('project_id', '=', $project_id) ->select(); } public static function getTagList($project_id) { $model = new static; return $model->with(['tag']) ->where('project_id', '=', $project_id) ->select(); } }