protected static function getRequestInclude($parameters, $modelClass = null)
    {
        //work with arrays
        if (!is_object($parameters) && is_array($parameters)) {
            $parameters = (object) $parameters;
        }

        $include = [];

        if ($modelClass !== null) {
            //Add additional include by default from resource model's relationships
            foreach ($modelClass::getRelationships() as $relationshipKey => $relationship) {
                if (($relationship->flags & Relationship::FLAG_INCLUDE_BY_DEFAULT) != 0) {
                    $include[] = $include;
                }
            }
        }

        if (!isset($parameters->include) || empty($parameters->include)) {
            return $include;
        }

        //split parameter using , (for multiple values)
        foreach (explode(',', $parameters->include) as $i) {
            $include[] = trim($i);
        }

        return array_unique($include);
    }