后台订单倒序

This commit is contained in:
Edward Yang 2022-07-29 17:55:37 +08:00
parent 7976bb7d3a
commit 37b4feff6c
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ class OrderRepo
*/
private static function getListBuilder($customer = null): Builder
{
$builder = Order::query();
$builder = Order::query()->orderByDesc('created_at');
if ($customer) {
$builder->where('customer_id', $customer->id);
}