Skip to content

Global Scope not returning Related Model #11764

@joshbodine21

Description

@joshbodine21

When I use a local scope and attempt to include a relationship (i.e., Account::with('Addresses')...) it returns the Account models with their related Address models in the response. However, when I run the same exact code in a global scope that I added to the model, the related Address models are not returned.

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