sign in
This commit is contained in:
parent
dedef1b8a0
commit
62eae59c81
@ -1015,7 +1015,14 @@ class ActivityController extends Controller
|
|||||||
$qrCode = Qrcode::where("merchant_id", $activity->merchant_id)->where("type_id", $activity->merchant_id)->first();
|
$qrCode = Qrcode::where("merchant_id", $activity->merchant_id)->where("type_id", $activity->merchant_id)->first();
|
||||||
if (empty($qrCode)) reutrn $this->failure("签到码不存在");
|
if (empty($qrCode)) reutrn $this->failure("签到码不存在");
|
||||||
|
|
||||||
$list = SignIn::where("qr_code_id", $qrCode->id)->paginate();
|
$list = SignIn::where("qr_code_id", $qrCode->id);
|
||||||
|
$keyword = $request->input("keyword");
|
||||||
|
if ($keyword) {
|
||||||
|
$list = $list->where(function($sql) use($keyword) {
|
||||||
|
$sql->where("name", "like", "%".$keyword."%")->orWhere("mobile", "like", "%".$keyword."%");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
$list = $list->paginate();
|
||||||
foreach ($list as $item) {
|
foreach ($list as $item) {
|
||||||
$item->is_sign = true;
|
$item->is_sign = true;
|
||||||
$item->sign_time = $item->created_at->toDateTimeString();
|
$item->sign_time = $item->created_at->toDateTimeString();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user