How to filter table based on grandparent relationships?

Say I have relationship structure: Project > Category > Article > Illustration
I'm interested in filtering by Project when viewing the Illustration list.
I have set up all my belongsTo() relationships. It's simple when using pure Laravel; to traverse back up the parents:
$illustration->article->category->project;

//works great!

But in filament I'm not sure how to handle this type of filtering. I realize this would be easy if Laravel handled nested relationships but apparently it does not 😦

I also realized that you can do some filament stuff for Form: Selects in forms like this:
Group::make([
    Group::make([
        Group::make([
            Select::make('project_id')
                ->relationship('project','name')
                ->reactive()
                ->required()
        ])->relationship('category'),
    ])->relationship('article'),
]),

That admittedly works for forms, but I cannot seem to find a similar / suitable solution for filtering table data based on grandparent relationships.
(I also experimented with the belongs-to-through package, but that doesn't seem to work either)

Any help would be appreciated, thanks!
Was this page helpful?