Skip to content

Limit in "Eager Loading" #193

@joserick

Description

@joserick

Hi,

I need to limit in query in relationship called through "Eager Loading".

/api/v1/posts/1?include=comments

BelongsToMany::make('comments')->relationLoad(
    static fn($query) => $query->limit(5)
);

Is possible?

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