//联系过我的经纪人
$appletChats=$this->AppletChat->orderBy('created_at','desc')->where([['user_id',$param['user_id']],['source',2]])
->get(['send_user','created_at'])->toArray();
// 二维数组去重
$res = array();
foreach ($appletChats as $value){
if (!empty($value['send_user'])) {
if (!isset($res[$value['send_user']])) {
$res[$value['send_user']] = $value;
}
}
}
dd($res);
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/112305.html原文链接:https://javaforall.cn