Skip to content

Commit

Permalink
refactor(titles): use relationship instead atomic table (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
warlof authored Aug 9, 2019
1 parent 29d76cc commit b63e362
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Repositories/Character/Info.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
use Illuminate\Support\Collection;
use Seat\Eveapi\Models\Character\CharacterCorporationHistory;
use Seat\Eveapi\Models\Character\CharacterInfo;
use Seat\Eveapi\Models\Character\CharacterTitle;

/**
* Trait Info.
Expand Down Expand Up @@ -87,7 +86,6 @@ public function getCharacterEmploymentHistory(int $character_id): Collection
public function getCharacterCorporationTitles(int $character_id): Collection
{

return CharacterTitle::where('character_id', $character_id)
->get();
return CharacterInfo::with('titles')->find($character_id)->titles;
}
}

0 comments on commit b63e362

Please sign in to comment.