how to use vue with laravel partials

Posted 2 years ago by ctf0

in laravel you have a login & register partial which extends the layout.app file.

so how can we use vuejs for both forms submission, atm i tried https://laracasts.com/series/learning-vue-step-by-step/episodes/20 but it doesnt work with things like v-model / etc...

// layout.app

<component is={{ $viewComp or '' }}>

// login

@extends('layouts.app', ['viewComp'=>'login'])
     <!-- the login form -->
// app.js

Vue.component('login', require('./components/Login.vue'));

const app = new Vue({
    el: '#app'
// login.vue


    export default {
        data() {
            return {
                identity: '',
                password: '',
                remember: false
        methods: {
            loginForm(event) {
                // ...

but instead i get


so have anyone gone through such scenario ?

Please sign in or create an account to participate in this conversation.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up


Reply to

Use Markdown with GitHub-flavored code blocks.