I am creating a simple login form using Laravel and VueJS.
Since I am designing the template of Login Form in .vue
file, @csrf
doesn't work at all.
So, how can I add csrf-token (@csrf
) or any of the blade syntax in any of the forms in .vue file?
Login.vue
<template>
<div class="app">
<form action="/login" method="post">
@csrf <!-- How can I make this work -->
<input type="text" class="email">
<input type="password" class="password">
<input type="submit" value="Login">
</form>
</div>
</template>