📅  最后修改于: 2022-03-11 14:53:42.026000             🧑  作者: Mango
$user_to_mail = User::where('store_id', $item->store_id)
->when($store->notification_role_id > 0, function ($q) use ($store) {
return $q->where('role_id', $store->notification_role_id);
})
->get();