Pass data to widget from custom page
Hi,
I'm trying to pass custom variable to widget component like below, but keep getting this error
"trim(): Argument #1 ($string) must be of type string, array given"
any help guys?
5 Replies
is shift an array?
it is a model instance, I also get the same error if I try to pass "$shift->id"
So the issue is widget-data being an array I suspect
I have tried it this way as it was mentioned in this thread:
https://discord.com/channels/883083792112300104/1095984082212634674
it does not throw an error when I pass it like that:
<x-filament-panels::page :widget-data="$shift">
but not sure how to access it then on widget component?
any ideas?
have you figured it out yet? im running same issue