im trying to display a simple TextColumn but nothing shows up
it didnt even dd(). has_uploaded_receipt is not a column name in db, i just want to create a custom one and format based on user relation with receipt.
original code:
8 Replies
you should have in the database a cell called
has_uploaded_receipt
of type boolean (1 or 0)
and if you want to alter the color of the field you can do something like
->color(function {if ($has_uploaded_receipt == 1) 'green' else 'danger'})
where success and danger are the color defined in panel config filewait, i thought we can have a custom column without needing a column in table
ok here is the doc
Solution
nvm, i have solved it using default() instead