src/Endpoint/PartitionEndpointProvider.php
public static function mergePrefixData($data, $prefixData)
    {
        $prefixGroups = $prefixData['prefix-groups'];

        foreach ($data["partitions"] as $index => $partition) {
            foreach ($prefixGroups as $current => $old) {
                $serviceData = Env::search("services.{$current}", $partition);
                if (!empty($serviceData)) {
                    foreach ($old as $prefix) {
                        if (empty(Env::search("services.{$prefix}", $partition))) {
                            $data["partitions"][$index]["services"][$prefix] = $serviceData;
                        }
                    }
                }
            }
        }

        return $data;
    }
public static function mergePrefixData($data, $prefixData)
    {
        $prefixGroups = $prefixData['prefix-groups'];

        foreach ($data["partitions"] as $index => $partition) {
            foreach ($prefixGroups as $current => $old) {
                $serviceData = Env::search("services.{$current}", $partition);
                if (!empty($serviceData)) {
                    foreach ($old as $prefix) {
                        if (empty(Env::search("services.{$prefix}", $partition))) {
                            $data["partitions"][$index]["services"][$prefix] = $serviceData;
                        }
                    }
                }
            }
        }

        return $data;
    }
public static function mergePrefixData ( $ data , $ prefixData ) { $ prefixGroups = $ prefixData [ 'prefix-groups' ] ; foreach ( $ data [ "partitions" ] as $ index => $ partition ) { foreach ( $ prefixGroups as $ current => $ old ) { $ serviceData = Env :: search ( "services.{$current}" , $ partition ) ; if ( ! empty ( $ serviceData ) ) { foreach ( $ old as $ prefix ) { if ( empty ( Env :: search ( "services.{$prefix}" , $ partition ) ) ) { $ data [ "partitions" ] [ $ index ] [ "services" ] [ $ prefix ] = $ serviceData ; } } } } } return $ data ; }
Copy endpoint data for other prefixes used by a given service

@param $data
@param $prefixData
@return array
Copy endpoint data for other prefixes used by a given service