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);
                    }),
            ]),
    ])
Was this page helpful?