character name to id issue

This commit is contained in:
2019-08-26 19:29:02 -05:00
parent 9e98025f24
commit 64d323570c

View File

@@ -50,7 +50,7 @@ class LookupHelper {
} catch(RequestFailedException $e) {
}
dd($response->character[0]);
if(isset($response->character[0])) {
$this->LookupCharacter($response->character[0]);
@@ -60,9 +60,9 @@ class LookupHelper {
}
} else {
$char = CharacterToCorporation::where(['character_name' => $character])->get(['character_id']);
$char = CharacterToCorporation::where(['character_name' => $character])->get(['character_id'])->first();
return $char[0]->character_id;
return $char->character_id;
}
}