待做事项: thinkphp5.1 模型关联一对一 一对多

hasOne('goods','id','good_id')->bind('name,photo,type,price,introduction,phone');
    }
}








    public function orderDetail($orderId)
    {
        $data = Order::where('id', $orderId)->with('good')->field('id,good_id,order_no,user_consignee,user_tel,user_address')->find();
        return $this->success($data);
    }

工作中遇到的情况如上:待做事项: thinkphp5.1 模型关联一对一 一对多_第1张图片

你可能感兴趣的:(java,前端,服务器)