Accessing data in ViewFiled

Hey guys, I have simple ViewField and according documentation I am trying to send some additional data to view with ->viewData(). But I don’t get it how to Access them in view after. Thanks for your help. I manage to find them in $field but since it’s protected I cannot use it.
Solution
So you access it just as you would any livewire passed element. with the key so:

 ->viewData(['field1' => 'my text'])


you would access it with:
 {{ $field1 }}
Was this page helpful?