I’m working with Vue.js and Laravel, and I’m trying to figure out how to redirect to a different frontend route after logging into my backend system. As a novice in programming, any guidance would be greatly appreciated.
async handleLogin() {
try {
const result = await axios.post('api/auth/signin', {
userEmail: this.userEmail,
userPassword: this.userPassword,
});
localStorage.setItem('authToken', result.data.authToken);
} catch (error) {
displayError = true;
setTimeout(hideError, 3000);
}
}