Add shared data to Infolist Livewire fields
I am using custom LiveWire components in my Infolist which look like so:
But both of those components are making an identical call in the mount() function like so:
and
So i wanted to create the variable $data in the infolist function but i am unable to access the resource here.
Wanted situation:
And then i would call the Livewire components as followed:
All this would be to not call the same Animal function on one page (since this is an API call to a third party). How would i be able to create an $data variable like above to pass to multiple Livewire fields in my infolist?
But both of those components are making an identical call in the mount() function like so:
and
So i wanted to create the variable $data in the infolist function but i am unable to access the resource here.
Wanted situation:
And then i would call the Livewire components as followed:
All this would be to not call the same Animal function on one page (since this is an API call to a third party). How would i be able to create an $data variable like above to pass to multiple Livewire fields in my infolist?