How to use Models in a Laravel Queue
问题 I'm trying to import a mailing list from CSV to my DATABASE. I have two models in my Laravel which is responsible for doing this: Target and Mailing (one Target has many Mailing s) I'm using Queue system with Beanstalkd. I'm using: Queue::push('ImportCSV', array( 'file' => $file->getClientOriginalName(), 'target' => $name )); To push my jobs and then I have the ImportCSV job class: class ImportCSV { public function fire($job, $data) { Log::info("Starting to add {$data['target']} to database")