hide a column in table builder

I have a relation manager, In relation manager I wanted to hide a column in table builder. I try this Tables\Columns\IconColumn::make('saml') ->boolean() ->trueIcon('heroicon-o-badge-check') ->falseIcon('heroicon-o-x-circle') ->hidden(fn($record) => dd($record->saml == 1)), But it’s giving me an error Attempt to read property "saml" on null
3 Replies
awcodes
awcodes2y ago
You can’t hide a column on a table based on the record. That’s just not how tables work.
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
awcodes
awcodes2y ago
I would just make the column togglable and let the user show or hide it if they choose.
Want results from more Discord servers?
Add your server