123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- namespace App\Jobs;
- use Illuminate\Bus\Queueable;
- use Illuminate\Queue\SerializesModels;
- use Illuminate\Queue\InteractsWithQueue;
- use Illuminate\Contracts\Queue\ShouldQueue;
- use Illuminate\Foundation\Bus\Dispatchable;
- class SendSMSJob implements ShouldQueue
- {
- use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
- protected $mobile = '';
- protected $data = '';
- protected $template = '';
- public $tries = 1;
- /**
- * Create a new job instance.
- *
- * @return void
- */
- public function __construct($mobile, $template, $data)
- {
- $this->mobile = $mobile;
- $this->data = $data;
- $this->template = $template;
- }
- /**
- * Execute the job.
- *
- * @return void
- */
- public function handle()
- {
- app('easy_sms')->send($this->mobile, [
- 'template' => $this->template,
- 'data' => $this->data
- ]);
- }
- }
|