这是我查询的剩余部分,但每当我在续集中使用下面的代码按类型排序时,它都会给出错误:
exception: the $sort key specification must be an object
查询部分:
$result =$query->orderByRaw("FIELD('Type', \"UNALLOCATEDPAYMENT\", \"UNALLOCATEDCREDIT\", \"OD\")")->paginate(10);
这是我查询的剩余部分,但每当我在续集中使用下面的代码按类型排序时,它都会给出错误:
exception: the $sort key specification must be an object
查询部分:
$result =$query->orderByRaw("FIELD('Type', \"UNALLOCATEDPAYMENT\", \"UNALLOCATEDCREDIT\", \"OD\")")->paginate(10);