How to bind eloquent data to an alpine instance from blade? #692
MichaelBrauner
started this conversation in
4. General
Replies: 1 comment 4 replies
-
Laravel collection can be converted to json using the toJson method. It's a perfectly valid data structure in js. |
Beta Was this translation helpful? Give feedback.
4 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.
Uh oh!
There was an error while loading. Please reload this page.
-
In my blade template I want to bind some data (eloquent collection-array) to the alpine instance:
This is obviously not working.
I know alpine is javascript and this eloquent collection is php.
Is there a way to bind that kind of data to an alpine instance?
Beta Was this translation helpful? Give feedback.
All reactions