Files
radicall/app/Jobs/SendPatternSms.php
T

30 lines
662 B
PHP

<?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);
}
}