feat: implement SMS notification service and integrate with existing services

This commit is contained in:
2026-09-21 02:47:12 +03:30
parent 51b13631a3
commit 1e599b917b
9 changed files with 153 additions and 48 deletions
+29
View File
@@ -0,0 +1,29 @@
<?php
namespace App\Jobs;
use App\Services\Sms\IranPayamakService;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Queue\Queueable;
class SendPatternSms implements ShouldQueue
{
use Queueable;
public int $tries = 3;
public array $backoff = [60, 300, 900];
public function __construct(
protected string $phone,
protected string $patternKey,
protected array $attributes
) {
$this->afterCommit();
}
public function handle(IranPayamakService $iranPayamakService): void
{
$iranPayamakService->sendPattern($this->phone, $this->patternKey, $this->attributes);
}
}