Getting "undefined index wars" on command and it was working before. But now when I run the command on a moved server it just errors out. I don't know if I'm missing an obvious answer or what.
    public function __construct(int $numWars = 500)
    {
        $client = new PWClient();
        $json = $client->getPage("http://game.com/api/wars/{$numWars}/?key=".env("API_KEY"));
        $decoded = \json_decode($json, true);
        $this->result = Collection::make($decoded["wars"]);
    }
 
     
     
    