We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 07fc45e commit c0e6282Copy full SHA for c0e6282
resources/js/router/index.js
@@ -52,7 +52,7 @@ router.beforeEach(async (to, from, next) => {
52
if (to.meta.requiresAdmin) {
53
if (!auth.isLoggedIn.value || auth.getUser.value.is_admin != 1) {
54
// ✅ Redirect to login if not logged or not admin
55
- next({ name: 'login' })
+ next({ name: 'login', query: { redirected_from: to.fullPath } })
56
}
57
58
// ✅ Redirect to panel if logged
0 commit comments