Skip to content

Commit c0e6282

Browse files
committed
Admin Panel Update
1 parent 07fc45e commit c0e6282

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

resources/js/router/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ router.beforeEach(async (to, from, next) => {
5252
if (to.meta.requiresAdmin) {
5353
if (!auth.isLoggedIn.value || auth.getUser.value.is_admin != 1) {
5454
// ✅ Redirect to login if not logged or not admin
55-
next({ name: 'login' })
55+
next({ name: 'login', query: { redirected_from: to.fullPath } })
5656
}
5757
}
5858
// ✅ Redirect to panel if logged

0 commit comments

Comments
 (0)