jeudi 29 juin 2017

How can pass more info to data in handle inside a job? Laravel 5.2

I have 2 queues, one is executed after the other. I used Queue::after to run the second queue.

When the first queue runs, i add more info to the $data variable in the handle function of the job but when i add it nothing happens.

Job

public function handle() {
    $icommHelper = new ICOMMHelper();
    $this->data['icom_user'] = $icommHelper->getUserData($this->data['request']['email'], $this->data['formMkt']->embudo);
}

In the AppServiceProvider

public function boot() {
Queue::after(function (JobProcessed $event) {
    $data = unserialize($event->data['data']['command']);
    if($data->queue == 'sendToIcom') {
        dd($data);
        $data = $data->data;
        Event::fire(new LogIcomData($data));
    }
});



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2srsUeL
via IFTTT

Aucun commentaire:

Enregistrer un commentaire