orderby用于排序查询的结果顺序,需要为一个字符串
例子:

//使用id降序排列
Db('user')->select([
            'orderby' => 'id desc',
        ])->get();
//sql:SELECT * FROM `user` ORDER BY id desc;
        
//按照姓名升序排列,兼容utf8
Db('user')->select([
            'orderby' => 'convert(username using gbk) asc',
        ])->get();
//sql:SELECT * FROM `user` ORDER BY convert(username using gbk) asc;
        
//按照年龄字段升序,并使用id降序
Db('user')->select([
            'orderby' => 'age asc,id desc',
        ])->get();
//sql:SELECT * FROM `user` ORDER BY age asc,id desc;

SQL小常识:在SQL语句中,ASC为升序,DESC为降序哟~