|
@@ -1761,7 +1761,7 @@ Route::get('/send_sms', function () {
|
|
|
$expire_date_it = date("d/m/Y", strtotime("+1 month"));
|
|
$expire_date_it = date("d/m/Y", strtotime("+1 month"));
|
|
|
$certificates = \App\Models\MemberCertificate::where('expire_date', $expire_date)->get();
|
|
$certificates = \App\Models\MemberCertificate::where('expire_date', $expire_date)->get();
|
|
|
foreach ($certificates as $certificate) {
|
|
foreach ($certificates as $certificate) {
|
|
|
- $new = \App\Models\MemberCertificate::where('expire_date', '>', $expire_date)->count();
|
|
|
|
|
|
|
+ $new = \App\Models\MemberCertificate::where('expire_date', '>', $expire_date)->where('member_id', $certificate->member_id)->count();
|
|
|
if ($new == 0)
|
|
if ($new == 0)
|
|
|
{
|
|
{
|
|
|
$phone = $certificate->member->phone;
|
|
$phone = $certificate->member->phone;
|
|
@@ -1783,7 +1783,7 @@ Route::get('/send_sms', function () {
|
|
|
$expire_date_it = date("d/m/Y", strtotime("+15 days"));
|
|
$expire_date_it = date("d/m/Y", strtotime("+15 days"));
|
|
|
$certificates = \App\Models\MemberCertificate::where('expire_date', $expire_date)->get();
|
|
$certificates = \App\Models\MemberCertificate::where('expire_date', $expire_date)->get();
|
|
|
foreach ($certificates as $certificate) {
|
|
foreach ($certificates as $certificate) {
|
|
|
- $new = \App\Models\MemberCertificate::where('expire_date', '>', $expire_date)->count();
|
|
|
|
|
|
|
+ $new = \App\Models\MemberCertificate::where('expire_date', '>', $expire_date)->where('member_id', $certificate->member_id)->count();
|
|
|
if ($new == 0)
|
|
if ($new == 0)
|
|
|
{
|
|
{
|
|
|
$phone = $certificate->member->phone;
|
|
$phone = $certificate->member->phone;
|