© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
3 replies
ericmp #2

How to get record in `columns` fn

i need to generate the columns dinamically.

    public static function table(Table $table): Table
    {
        return $table
            ->query(Response::latest())
            ->columns((function (): array {
                // here i need to retrieve the record to be able to costumize the columns
                $record = ??
             ...
    public static function table(Table $table): Table
    {
        return $table
            ->query(Response::latest())
            ->columns((function (): array {
                // here i need to retrieve the record to be able to costumize the columns
                $record = ??
             ...


is this possible?
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

How to access form component record in ->when fn?
FilamentFFilament / ❓┊help
2y ago
How to get record model in ViewRecord action?
FilamentFFilament / ❓┊help
3y ago
How to get record id in relation managers?
FilamentFFilament / ❓┊help
2y ago