opnform/resources/js/middleware/guest.js

10 lines
158 B
JavaScript

import store from '~/store'
export default (to, from, next) => {
if (store.getters['auth/check']) {
next({ name: 'home' })
} else {
next()
}
}