/** * Execute the console command. * * @return mixed */ public function fire() { $this->info('Start fetching'); $this->user->hasDropboxToken()->hasImgurToken()->chunk(10, function ($users) { foreach ($users as $user) { $this->pushFetchImagesQueue($user); } }); $this->info('Done'); }
/** * Execute the console command. * * @return mixed */ public function handle() { $this->info('Start fetching'); $this->user->hasDropboxToken()->hasImgurToken()->chunk(10, function ($users) { foreach ($users as $user) { $this->dispatch((new FetchImages($user))->onQueue('low')); } }); $this->info('Done'); }