© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
21 replies
BlackShadow

Get all the table columns from a resource

Would there be way to get all the columns from a resource?
Solution
protected function getResourceTableColumns(): array
{
    $livewire = app('livewire')->new(ListRecords::class);

    return YourResource::table(new Table($livewire))->getColumns();
}
protected function getResourceTableColumns(): array
{
    $livewire = app('livewire')->new(ListRecords::class);

    return YourResource::table(new Table($livewire))->getColumns();
}
Jump to solution
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 all sortable columns of table
FilamentFFilament / ❓┊help
2y ago
Export All columns of a Resource
FilamentFFilament / ❓┊help
3y ago
Table Columns from Database
FilamentFFilament / ❓┊help
2y ago
Toggle all table columns on / off
FilamentFFilament / ❓┊help
3mo ago