© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
6 replies
TomášZ

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'])
 ->viewData(['field1' => 'my text'])


you would access it with:
 {{ $field1 }}
 {{ $field1 }}
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Accessing repeater data
FilamentFFilament / ❓┊help
3y ago
Accessing form data in suffixAction form.
FilamentFFilament / ❓┊help
2y ago
Accessing relationship data in form lifecycle hook
FilamentFFilament / ❓┊help
13mo ago
Accessing page table data in the widget
FilamentFFilament / ❓┊help
2y ago