How to display masked value in table columns?

I have an input for a phone like this:

 TextInput::make('mobile_phone')->mask(fn (TextInput\Mask $mask) => $mask->pattern('(000) 000-0000'))


But in the table, it is showing plain digits like "2223334444" (because that is what stored in the db). I guess there's a better way to handle columns like this before I experiment ->formatStateUsing method?
Was this page helpful?