Skip to content

Simplify allowed include paths implementation #392

@JapSeyz

Description

@JapSeyz

Hi,

When loading relations like this:

GET 1?http://test.com/car-manufacturers/1?include=factories.cars%2Cdrivers.children

and having this:

protected $allowedIncludePaths = ['drivers', 'factories'];

The queryRules() fails, as it's not the exact rules provided.

The hack right now is to return include => 'string', but it feels dirty.

Is there a better way to properly validate the relations?

Cheers

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions