Create Column not included in the query #898
-
Hi, is possible to create a boolean column that is not included in the query? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I'm interested in the answer to this. I would like to create custom columns that don't rely on an actual value in the model or database to work. The only way I've been able to make it work is to include a column that isn't actually needed and then format it how I want, which isn't ideal. |
Beta Was this translation helpful? Give feedback.
-
Setup the Column as a Label one, and it won't try to add it to the query. Column::make('My one off column')
->label(
fn ($row, Column $column) => 'Whatever Function You Would Like'
), |
Beta Was this translation helpful? Give feedback.
Setup the Column as a Label one, and it won't try to add it to the query.