thephpleague / fractal

Output complex, flexible, AJAX/RESTful data structures.

Home Page:fractal.thephpleague.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

siarheipashkevich opened this issue · comments

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.