public function aliasRelationshipWhere($column, $tableAlias, $pivotAlias, $pivot)
    {
        //first explode the string on "." in case it was given with the table already included
        $split = explode('.', $column);

        //if the second split item exists, there was a "."
        if (isset($split[1])) {
            //if the table name is the pivot table, append the pivot alias
            if ($split[0] === $pivot) {
                return $pivotAlias.'.'.$split[1];
            }
            //otherwise append the table alias
            else {
                return $tableAlias.'.'.$split[1];
            }
        } else {
            return $tableAlias.'.'.$column;
        }
    }