Answer the question
In order to leave comments, you need to log in
How to pass your data to Laravel 5.3 Queue Queue?
How can I pass my data to the Queue so that when processing the queue in the handle () method, operations are performed on them?
I try to throw it as in the example, but my data only shows from the last queue, that is, if the element in the queue is 1, then everything is fine, but if more, then only the last $my_data is displayed.
class SendReminderEmail extends Job implements ShouldQueue
{
use InteractsWithQueue, SerializesModels;
protected $my_data;
public function __construct($my_data)
{
$this->my_data = $my_data;
}
public function handle()
{
echo $my_data;
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question