F
Filament11mo ago
Ayz

2 resource columns from same db column

I store a simple "qty" field in a db table to represent the number of units of a product. However, it needs to be presented in the resource list as "packs" and "units". On the fly, the system should populate the columns with a rounded down division and modulo operation respectively. So 12 units of a product of 10 per pack collation should show up as 1 pack, 2 units (2 separate columns) Filament is however ignoring a 2nd TextColumn::make call to same database column. How can I achieve this objective? Like if a column could be made out of a function defined in the model.
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server