src/Components/DbSchemaExtras.php
public function getSchemaExtrasForRelated($table_name, $related_names = '*', $select = '*')
    {
        if (empty($related_names)) {
            return [];
        }

        if ('*' === $related_names) {
            return DbRelationshipExtras::whereServiceId($this->getServiceId())
                ->whereTable($table_name)->get((array)$select)->toArray();
        }

        if (false === $values = static::validateAsArray($related_names, ',', true)) {
            throw new \InvalidArgumentException('Invalid related list. ' . $related_names);
        }

        return DbRelationshipExtras::whereServiceId($this->getServiceId())
            ->whereTable($table_name)->whereIn('name', $values)->get((array)$select)->toArray();
    }
public function getSchemaExtrasForRelated($table_name, $related_names = '*', $select = '*')
    {
        if (empty($related_names)) {
            return [];
        }

        if ('*' === $related_names) {
            return DbRelationshipExtras::whereServiceId($this->getServiceId())
                ->whereTable($table_name)->get((array)$select)->toArray();
        }

        if (false === $values = static::validateAsArray($related_names, ',', true)) {
            throw new \InvalidArgumentException('Invalid related list. ' . $related_names);
        }

        return DbRelationshipExtras::whereServiceId($this->getServiceId())
            ->whereTable($table_name)->whereIn('name', $values)->get((array)$select)->toArray();
    }
@param string         $table_name
@param string | array $related_names
@param string | array $select

@throws \InvalidArgumentException
@return array