I've declared my middleware in index.vue under a group route. The middleware doesn't works and then I tried to rename the index with layout.vue (also it renders other pages under protected) . So is there any way to protect this route?
I thought defining index.vue for the entry of that group route will solve the issue and I can use my middleware to check for the all routes that comes under protected.
My goal: run a middleware only for the routes that is grouped names as (protected)