How to use hidden() in a table programmatically

I need to hide a column if another column doesn't have a given value. But this doesn't work on any way.

Tables\Columns\SelectColumn::make('rate')
                    ->options([
                        '1' => '1 star',
                        '2' => '2 stars',
                        '3' => '3 stars',
                        '4' => '4 stars',
                        '5' => '5 stars',
                    ])
                    ->hidden(function(Closure $get) {
                        return $get('status') !== 'approved';
                    })
                    ->label('Calificación'),
Was this page helpful?