Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Vuejs + Laravel router redirection issue

methods: {
        submit: function(e) {
            e.preventDefault(); // <-- added this
            axios.post('api/login', this.form).then(response => {
                if (response.status == 201) {
                    this.$router.push({name: 'uDashboard'});
                }
            })
        }
    }
 
PREVIOUS NEXT
Tagged: #Vuejs #Laravel #router #redirection #issue
ADD COMMENT
Topic
Name
7+1 =