[Vuejs]-How to feed Vue.js variable into php function?

0👍

Since I couldn’t find a way to inline both blade syntax and Vue.js variable rendering I see the solution is to first invoke the php function and then append the Vue.js rendering to it.

So, the workaround would be

 <img :src="'{{ file_storage_path('/') }}' + image.path" alt="@{{product.name}}" />

This solution would work only for specific case, it doesn’t get answer to my original question, when a php function actually needs to accept a Vue variable. But in this case, I can simply append values.

Leave a comment