FilamentF
Filament3y ago
Xavi

Get current record

How can i get current record on a table builder to show a relationship field on a column

I try this, but it doesnt works

TextColumn::make('google_users')
                ->label('Google Users')
                ->getStateUsing(function (User $user) {
                    return $user->googleUsers()->count();
                })
                ->sortable(),
Was this page helpful?