问题描述
我有用户表和连接表。我想建立一种关系,该关系将返回该用户的所有连接。
连接表:
Auth :: id()可能是在user_id或request_user_id中,我想让连接的用户与授权用户一起使用。
我已经写了这个,但是没有记录。我想念什么吗?
public function connections()
{
return $this->belongsToMany('\App\User','connections','requested_user_id','user_id');
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)