You need to change
Log::info('This is from the worker thread . The data array is = '.var_export($data));
to
Log::info('This is from the worker thread . The data array is = '.var_export($data, true));
Frage
I am trying to work with laravel 4.1 queues. I have the code below
Queue::push('TopicQueue', array('string' => 'Hello World'));
and the TopicQueue is as follows
class TopicQueue {
public function fire($job, $data){
Log::info('This is from the worker thread . The data array is = '.var_export($data));
$job->delete();
}
}
In the log I am getting this
[2014-05-14 03:19:02] production.INFO: This is from the worker thread . The data array is = [] []
My question is "How do I pass data , to the TopicQueue fire method ? If I am doing something wrong, can somebody please point it out for me?
Lösung
You need to change
Log::info('This is from the worker thread . The data array is = '.var_export($data));
to
Log::info('This is from the worker thread . The data array is = '.var_export($data, true));