how customize polymorph type name

i want to show only class name in as and remove app\models\ Thx u
No description
2 Replies
DrByte
DrByte12mo ago
I used formatStateUsing() for that:
->formatStateUsing(fn ($state):string => \class_basename($state))
->formatStateUsing(fn ($state):string => \class_basename($state))
jepewsykes
jepewsykesOP12mo ago
ok thx u bro
Want results from more Discord servers?
Add your server