public function execute() { $games = $this->game->doesntHave('series')->orderBy('created_at', 'desc')->get(); $this->log("Populating " . $games->count() . " games."); $games->each(function ($model) { $data = collect(['config' => ['mode' => 'new'], 'game' => $model]); $this->dispatch(new Asyncify($data, $this->getPipeline())); }); }
public function getByApiId($id) { $game = Game::where('api_id', $id)->with('videos', 'creators', 'series')->first(); return $game; }