1

I'm working on simple app and I decided to use Laravel 5.4 and Vue.js. When I want to print something in vue.js I use "{{message}}" code like this.

But it throws an exception in php (Laravel)

In Laravel {{ }} also uses to print.

{{}} = <?php echo ''; ?>

Is it possible and is there a way to change {{}} identifier to (()) In Laravel or Vue.js?

1 Answer 1

6

You can tell Laravel to ignore mustaches templating since Vue use it by putting @ in front of expression

@{{ message }}

This would be ignored by Laravel.

Also, you can change delimiters in VueJS - check docs https://v2.vuejs.org/v2/api/#delimiters

Sign up to request clarification or add additional context in comments.

1 Comment

This is also the (Laravel) documented way to ignore handlebars.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.