3👍
✅
If I got you right: You are trying to pass data from Vue.Js to Laravel-Components. Unfortunately this is not possible. Blade gets processed on the server-side where Vue.Js is not yet available. So the variable entry.links.show
do not yet exist in Laravel (only available on client-side) and therefore cannot be passed to the Laravel-Component. After the HTML got rendered by Blade and passed to the Browser, Vue.Js can pick it up and replicate your template for the v-for
and generate your list. At this point your ‘link’-variables get available.
Solutions:
- You could extract your code to a Vue.Js-Component rather than a Laravel-Component. This would be interpreted on client-side.
- An other solution would be to generate this list through Blade so you could use Laravel-Components.
Source:stackexchange.com