Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Flex's avatar
Level 4

vue js props not working properly in Laravel App

working with Laravel 10 Vue Js 3 and Vuex 4 with state management. I have following welcome.blade.php

and mainapp.vue is

store.js

import { createStore } from 'vuex';

const store = createStore({
    state: {
       user: false, 
    }, 
    mutations: {
        updateUser(state, data) {
            console.log('updateUser mutation called with data:', data); // Debugging line
            state.user = data; // Update user state
            console.log('state.user after update:', state.user); // Debugging line
        }
    }, 

    
});
export default store;

in my Laravel blade file print user object data well. but not passed them to mainapp.vue file what is the problem and how could I fix this problem as well?

0 likes
0 replies

Please or to participate in this conversation.