Replies: 1 comment
-
Ok, so I've sort of got this working... For first example syntax needs to be:
BUT that will only work if you create a hidden column before it:
as stated on Slack, once again seems I'm being forced to create hidden columns just so that I have access to value elsewhere. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
So I need to format a field from a related table. I can display a column for this field with:
Column::make('Country', 'user.country.short_code')
Great, but how do I access the same field in say in a custom view or using format or label?
Neither of these work:
or:
and then for 'my.other.view'
<strong> {{ $row->user->country->short_code }} </strong>
Any help appreciated?
Note: In v1 with rowView everything was so much simpler - one single place where you could define the formatting for all your columns and add any custom conditions, AND you automatically had access to all fields from your query. Now in v2 seems you need to potentially define new views for every column with special formatting/conditions AND you don't have access to fields you need :(
Beta Was this translation helpful? Give feedback.
All reactions