class JsonApiUtil

Methods

static array
parseRelationshipPaths(array $paths)

Parse relationship paths.

Details

at line 23
static array parseRelationshipPaths(array $paths)

Parse relationship paths.

Given a flat array of relationship paths like:

['user', 'user.employer', 'user.employer.country', 'comments']

create a nested array of relationship paths one-level deep that can be passed on to other serializers:

['user' => ['employer', 'employer.country'], 'comments' => []]

Parameters

array $paths

Return Value

array