© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
10 replies
ImShehryar

InfoList Tabs Query

For example Meetings hasMany resolutions and resolutions table consists of a boolean column 'resolution_passed' as true or false:
How to filter as 'Passed' and 'Rejected' and show in separate tabs in infoList tabs:

Section::make('Resolutions details')
->schema([
Tabs::make('Resolutions')
->tabs([
Tabs\Tab::make('Passed')
->schema([
// query resolutions where 'resultion_passed' = true
]),
Tabs\Tab::make('Rejected')
->schema([
// query resolutions where 'resultion_passed' = false
]),
])
])
->compact()
->collapsible()
Solution
thanks sir....its ->state()
Tabs::make('Resolutions Details')
    ->tabs([
        Tabs\Tab::make('Passed')
            ->schema([
                RepeatableEntry::make('resolutions')
                    ->hiddenLabel()
                    ->schema([
                        TextEntry::make('resolution_no'),
                    ])
                    ->state(function (Model $record) {
                        return $record->resolutions->where('resolution_passed', true);
                    }),
            ]),
        Tabs\Tab::make('Rejected')
            ->schema([
                RepeatableEntry::make('resolutions')
                    ->hiddenLabel()
                    ->schema([
                        TextEntry::make('resolution_no'),
                    ])
                    ->state(function (Model $record) {
                        return $record->resolutions->where('resolution_passed', false);
                    }),
            ]),
    ])
Tabs::make('Resolutions Details')
    ->tabs([
        Tabs\Tab::make('Passed')
            ->schema([
                RepeatableEntry::make('resolutions')
                    ->hiddenLabel()
                    ->schema([
                        TextEntry::make('resolution_no'),
                    ])
                    ->state(function (Model $record) {
                        return $record->resolutions->where('resolution_passed', true);
                    }),
            ]),
        Tabs\Tab::make('Rejected')
            ->schema([
                RepeatableEntry::make('resolutions')
                    ->hiddenLabel()
                    ->schema([
                        TextEntry::make('resolution_no'),
                    ])
                    ->state(function (Model $record) {
                        return $record->resolutions->where('resolution_passed', false);
                    }),
            ]),
    ])
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
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Infolist tabs query parameter updating live on changing tabs
FilamentFFilament / ❓┊help
8mo ago
infolist tabs ->persistTabInQueryString()
FilamentFFilament / ❓┊help
3y ago
Is there a way to align Tabs on infolist ?
FilamentFFilament / ❓┊help
3y ago
infolist
FilamentFFilament / ❓┊help
3y ago