thephpleague / fractal

Output complex, flexible, AJAX/RESTful data structures.
fractal.thephpleague.com
MIT License
3.53k stars 351 forks source link

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

Open siarheipashkevich opened 2 years ago

siarheipashkevich commented 2 years ago

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.