Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.eloquentfiltering.com/llms.txt

Use this file to discover all available pages before exploring further.

Overview

There is an convenience method on Filter::relation that allows you to easily define nested relationships.
public function allowedFilters(): AllowedFilterList
{
    return Filter::only(
        Filter::relation('posts', [FilterType::HAS])->includeRelationFields()
            ->andNestedRelation(
                Filter::relation('comments', [FilterType::HAS])->includeRelationFields()
            ),
    );
}