© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
4 replies
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(),
TextColumn::make('google_users')
                ->label('Google Users')
                ->getStateUsing(function (User $user) {
                    return $user->googleUsers()->count();
                })
                ->sortable(),
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Get current row record in custom action
FilamentFFilament / ❓┊help
2y ago
Custom Rule - Current record?
FilamentFFilament / ❓┊help
16mo ago
Repeater access current $record
FilamentFFilament / ❓┊help
3y ago
How do i Get the current record in Select i want values except the current record id
FilamentFFilament / ❓┊help
2y ago