nizam0786
2 months ago
16
2
Vue

Vue axios redirect with flash message

Posted 2 months ago by nizam0786

Hi Guys,

I want to redirect the user and return a flash message after posting some data.

I have a flash function which works in vue I just have to call flash('message') and it works but don't know how to redirect and then show the message.


this.form.post('/users')
                    .then(function (response){
                    let url = '/users/' + response.id;

                    //redirect to url and flash a message
        flash('User successfully created')
                })

Thanks in advance.

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