restore composer.json, add mysqli extension

This commit is contained in:
2026-04-15 17:02:52 +05:00
commit 77cf56a348
4317 changed files with 1397107 additions and 0 deletions

46
app/Jobs/Cron/SendSmsJob.php Executable file
View File

@@ -0,0 +1,46 @@
<?php
namespace App\Jobs\Cron;
use App\Api\Sms;
use App\Models\NotificationAvailable;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
class SendSmsJob implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct()
{
//
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
$notifications = NotificationAvailable::where('sms', 0)->get();
$sms = new Sms();
foreach ($notifications as $notification) {
$message = "Quyoshli: Tovar {$notification->product->getName()} teper dostupen dlya pokupki";
$sms->send($notification->phone, $message);
$notification->delete();
sleep(0.5);
}
}
}