Okay, here I found a issue while using with Laravel queue.
Queue:work only can send first sms, and then for every sms it hrows this:
[] operator not supported for strings {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): [] operator not supported for strings at /home/farhad/html/sust_admission/vendor/shipu/muthofun-sms-gateway/src/MUTHOFUN.php:56)
And this is Job Class
`<?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;
use \Shipu\MuthoFun\Facades\MuthoFun;
class SMS_SendExactMessage implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* The number of times the job may be attempted.
*
* @var int
*/
public $tries = 100;
public $message, $number;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct($message, $number)
{
$this->message = $message;
$this->number = $number;
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
$sms = MUTHOFUN::message($this->message, $this->number)->send();
}
}
`
I found a workaround.
But I thought it would be helpful to notify you.
Thank you.
Okay, here I found a issue while using with Laravel queue. Queue:work only can send first sms, and then for every sms it hrows this:
[] operator not supported for strings {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): [] operator not supported for strings at /home/farhad/html/sust_admission/vendor/shipu/muthofun-sms-gateway/src/MUTHOFUN.php:56)
And this is Job Class
`<?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; use \Shipu\MuthoFun\Facades\MuthoFun;
class SMS_SendExactMessage implements ShouldQueue { use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
} `
I found a workaround.
But I thought it would be helpful to notify you. Thank you.