在thinkphp6中,支持给关联统计指定统计属性名(类似于取别名)。

    实例:

    数据库表:Users表、profile表

    Users表
    image.png
    profile表
    image.png

    profile模型
    image.png

    Users模型
    image.png

    Users控制器
    image.png

    输出结果:
    image.png