firstOrFail(); if ($seed->race) { $seed->makeHidden('seed'); } if ($seed->mystery) { $seed->makeHidden('settings'); } return $seed->toJson(); } public function retry($hash) { $seed = AlttpSeed::where('hash', '=', $hash)->firstOrFail(); if ($seed->status == 'error') { $seed->status = 'pending'; $seed->save(); Artisan::call('alttp:generate '.intval($seed->id)); } return $seed->toJson(); } }