feat: implement SMS notification service and integrate with existing services
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user