浏览代码

更多 random

maa3606 2 年之前
父节点
当前提交
2325789b16
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      app/Http/Controllers/DrawController.php

+ 1 - 0
app/Http/Controllers/DrawController.php

@@ -27,6 +27,7 @@ class DrawController extends Controller
             ->where('is_checked_in', 'true')
             ->whereTime('check_ins.updated_at', '<=', $activity->deadline)
             ->whereIn('region', $request->region)
+            ->inRandomOrder()
             ->get()
             ->random($request->number);