Skip to content

How to set includes for specific includeItem in the code for transformer? #558

@siarheipashkevich

Description

@siarheipashkevich

Hi all.

I have transformer with relation for including

public function includeChild(Parent $parent): Item
{
    // How can I set `includes` for child transformer here?
    // without request param /parent?include=child.*

    return $this->item($parent->child, new ChildTransformer());
}

Thank you for your help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions