0👍
Just to give you a full answer here: The reason, why there is a problem is, that either you need to use "
or '
for your html attribute. This leads to the problem, that you might have both of them inside your json output.
To avoid that, you need to encode html entities inside your json string like
<vue-component :language="<?php htmlentities(json_encode($frontLanguage), ENT_QUOTES) ?>" />
- [Vuejs]-Question about my vue test app with supabase
- [Vuejs]-How to redirect to login page if user not authenticate in vue 3 and Laravel as backend
Source:stackexchange.com