Custom table relationship count

Hello, I need to filter the realtionship count of a column.

Tables\Columns\TextColumn::make('comments_count')->counts(fn (Builder $query) => $query->withCount('comments')->where('status_id', 1))       ->sortable(),


What am I doing wrong?
Was this page helpful?