Is it possible to create src/middleware/guest.js, src/middleware/auth.js, src/middleware.role.js... and define the middleware in pages ?
For example, is a page exists like: src/pages/student/somepage.vue then this page should be accessible only by an authenticated user and the role of the user should be student.
Is it possible to create src/middleware/guest.js, src/middleware/auth.js, src/middleware.role.js... and define the middleware in pages ?
For example, is a page exists like: src/pages/student/somepage.vue then this page should be accessible only by an authenticated user and the role of the user should be
student
.