private function resolveInternalCharacterIDs(Collection $ids)
    {

        // resolve names that are already in SeAT
        // no unnecessary api calls the request can be resolved internally.
        $names = CharacterInfo::whereIn('character_id', $ids->flatten()->toArray())
            ->get()
            ->map(function ($character) {
                return collect([
                    'id' => $character->character_id,
                    'name' => $character->name,
                    'category' => 'character',
                ]);
            });

        return $this->cacheIDsAndReturnUnresolvedIDs($names, $ids);
    }
private function resolveInternalCharacterIDs(Collection $ids)
    {

        // resolve names that are already in SeAT
        // no unnecessary api calls the request can be resolved internally.
        $names = CharacterInfo::whereIn('character_id', $ids->flatten()->toArray())
            ->get()
            ->map(function ($character) {
                return collect([
                    'id' => $character->character_id,
                    'name' => $character->name,
                    'category' => 'character',
                ]);
            });

        return $this->cacheIDsAndReturnUnresolvedIDs($names, $ids);
    }
private function resolveInternalCharacterIDs ( Collection $ ids ) { // resolve names that are already in SeAT // no unnecessary api calls the request can be resolved internally. $ names = CharacterInfo :: whereIn ( 'character_id' , $ ids -> flatten ( ) -> toArray ( ) ) -> get ( ) -> map ( function ( $ character ) { return collect ( [ 'id' => $ character -> character_id , 'name' => $ character -> name , 'category' => 'character' , ] ) ; } ) ; return $ this -> cacheIDsAndReturnUnresolvedIDs ( $ names , $ ids ) ; }
Resolve received sets of ids with the help of character_infos table
map the resolved names, cache the results and return unresolved ids.

@param \Illuminate\Support\Collection $ids
@return \Illuminate\Support\Collection collection of ids that were unable to be resolved within this function
Resolve received sets of ids with the help of character_infos table map the resolved names cache the results and return unresolved ids .