/** * @author EB, EA, WN * @param Merchant $merchant * @return Collection */ protected function fetchMerchantLocations(Merchant $merchant) { $installations = $merchant->installations()->get(); $merchantLocations = new Collection(); foreach ($installations as $installation) { $installationLocations = $installation->locations()->get(); foreach ($installationLocations as $location) { $merchantLocations->push($location); } } return $merchantLocations; }