Interface LaravelUi5\OData\Service\Contracts\VirtualExpandResolverInterface

Resolver that can serve as a virtual navigation expand on parent entities.

Implement this alongside CustomEntitySetInterface when the entity set should appear as a navigation property on discovered Eloquent models without a real Eloquent relation backing it.

Example: KPIs computed from multiple tables, expanded on User and Project.

class Kpis implements CustomEntitySetInterface, VirtualExpandResolverInterface { public function expandsOn(): array { return ['User' => 'kpis', 'Project' => 'kpis']; }

public function resolveExpand(array $parentRow, string $parentEntityType, ExpandItem $expand): array { // parentRow has the User/Project data; expand carries $filter, $select, etc. return [['kpi_id' => 1, 'name' => 'Hours', 'value' => 42.0]]; } }

Registration via discoverCustomEntitySet() automatically wires the navigation properties and bindings on the parent entity types.

Methods