How can I use Blade in Vue files?

Viewed 7739

I'm trying to use Blade in my Vue file carousel-signUp.vue

Like:

<template>
    <div>           
        <form action="{{route('dump')}}" method="POST" >
           /* Some code here...*/
        </form>
   </div>
</template>

But in the end I'm getting an error.

The compiler can't understand the difference between Vue syntax and Blade syntax. How can I define Blade syntax in Vue files?

Or, does anyone have an idea how to use {{route('dump')}} value in my vue file?

4 Answers

You can parse your data to Json and then you can redirect your blade to vue Companent. I will mention below about it.

<your-companent data={{$yourDataFromBackEnd}}></your-companent>

Like that, you can catch as "data" in Vue if you have experience on VueJs.

Related