Can you use IconColumn without database column
Hello,
I'm using Breezy and I have a question about displaying the status of two-factor authentication (2FA) for users. In the documentation, I noticed that columns are created using database column names, but I'd like to use the breezy function to determine if a user has enabled 2FA or not, because as far as i noticed there is no database field for that.
This is the code i have so far, but did not work:
Solution:Jump to solution
Maybe something like this:
```php
IconColumn::make('2fa')
->getStateUsing(fn (User $record) => $record->hasEnabledTwoFactor())
->trueIcon('heroicon-o-lock-closed')...
2 Replies
Solution
Maybe something like this:
Thank you that works.