企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
```` public function follow_fans(Request $request) { $id = $request->param('id'); //用户id $uid = $request->user->id; $friend = new Follow(); $friend->from_id = $request->user->id; ```` - 增加对象 ```` /* * * */ public function fans(Request $request) { $me = $request->user; $fans = Follow::where('to_id', $me->id)->select(); foreach ($fans as $person) { // print_r($person);exit; $person->profile = Nintyuser::get($person->from_id); $person->profile->name = base64_decode($person->profile->name); //是否互相关注 $follow_status = Follow::where('from_id', $me->id)->value('from_id'); $person->profile->is_follow = empty($follow_status)?false:true; } $this->success($fans); }