diff --git a/app/adminapi/logic/custom_follow/CustomFollowLogic.php b/app/adminapi/logic/custom_follow/CustomFollowLogic.php index bafa2c5f8..225e50947 100644 --- a/app/adminapi/logic/custom_follow/CustomFollowLogic.php +++ b/app/adminapi/logic/custom_follow/CustomFollowLogic.php @@ -119,6 +119,8 @@ class CustomFollowLogic extends BaseLogic */ public static function detail($params): array { - return CustomFollow::findOrEmpty($params['id'])->toArray(); + $customFollow = CustomFollow::findOrEmpty($params['id']); + $customFollow->custom = $customFollow->custom; + return $customFollow->toArray(); } } \ No newline at end of file diff --git a/app/common/model/custom_follow/CustomFollow.php b/app/common/model/custom_follow/CustomFollow.php index db1f171b2..ef62a6001 100644 --- a/app/common/model/custom_follow/CustomFollow.php +++ b/app/common/model/custom_follow/CustomFollow.php @@ -40,5 +40,10 @@ class CustomFollow extends BaseModel return empty($value) ? '' : date('Y-m-d H:i:s', $value); } + public function custom() + { + return $this->belongsTo(\app\common\model\custom\Custom::class, 'custom_id'); + } + } \ No newline at end of file