opnform/resources/js/middleware/guest.js

10 lines
158 B
JavaScript
Raw Normal View History

2022-09-20 19:59:52 +00:00
import store from '~/store'
export default (to, from, next) => {
if (store.getters['auth/check']) {
next({ name: 'home' })
} else {
next()
}
}