-
Can you concat a relationship model. For example call the User model in the builder() and concat Town + City from the related Location model. At the moment its seems I have to add Town and City and hide them in the table and concat both these rows. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
Yep, use the setAdditionalSelects function to select the relevant fields, you can then use them in the table.
|
Beta Was this translation helpful? Give feedback.
-
Minor question can these still be searchable and sortable?
|
Beta Was this translation helpful? Give feedback.
-
Great here is the amended code since using '->label' stopped the search functionality working so replaced it with '->format'.
|
Beta Was this translation helpful? Give feedback.
-
If you look at my attribute suggestion, you can take the (empty()) bit out of there and that'll stop spurious commas in case town is ever empty. |
Beta Was this translation helpful? Give feedback.
Yep, use the setAdditionalSelects function to select the relevant fields, you can then use them in the table.
See Manual