F
Filament16mo ago
jop00

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(),
Tables\Columns\TextColumn::make('comments_count')->counts(fn (Builder $query) => $query->withCount('comments')->where('status_id', 1)) ->sortable(),
What am I doing wrong?
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?