Skip to content

set includes for response #38

@naabster

Description

@naabster

I wonder if there is a nicer way to set includes for the response. I dont mean to parse the includes from include parameter, but set them "manually" for that response.

right now I am doing this (Laravel):

    $this->response->getManager()->parseIncludes('team');
    return $this->response->withItem($request->user(), new UserTransformer);

Maybe something like

    return $this->response->parseIncludes('team')->withItem($request->user(), new UserTransformer);

would be shorter and nicer. I could prepare a pull request if that's something you would like to integrate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions