/** * Handle the event. * * @param NewContentAvailable $event * @return void */ public function handle(NewContentAvailable $event) { $type = $event->type; if ($type === 'playlist') { $this->populateSeries->execute(); } if ($type === 'game') { $this->populateGames->execute(); } }
/** * Execute the console command. * * @return mixed */ public function handle() { $this->populate->execute(); }
public function getPipeline() { $seriesPipeline = $this->populateSeries->getPipeline(); $pipeline = (new Pipeline())->pipe(App::make(SearchSeriesForGame::class))->pipe(App::make(SaveSeriesData::class))->pipe($seriesPipeline); return $pipeline; }