print function value
HI,
the solution is probably very stupid but I haven't found it, but I would like to display the result of a function of a model in a column.
The function is in my User model and returns a number that the column should display (so each row will have a different number in the column because it launches the function for a different user each time)
4 Replies
->formatStateUsing(fn($record) => dump($record))
will dump the column record and you can see the data returned.
But when i do this, nothing is displayed :
for information, the column "number" didn't exist on my table user, but i can't put nothing else
number
is null, therefore it's not rendered. You need getStateUsing()
instead