error($exception->getMessage()); return 1; } $index = []; foreach ($data['nests'] as $nest) { $nestName = $nest['nest_type']; $this->info("Nest: $nestName"); $nestEggs = []; foreach ($nest['Eggs'] as $egg) { $eggName = $egg['egg']['name']; $this->comment("Egg: $eggName"); $nestEggs[$egg['download_url']] = $eggName; } $index[$nestName] = $nestEggs; $this->info(''); } cache()->forever('eggs.index', $index); return 0; } }