dimanche 10 juin 2018

Make nested route inside AuthenticatedRouteMixin accessible

I'd like to "free" one nested route, so that also users who are not even logged in can access this route.

For example:

posts - /create - /edit - /show

On the posts route I used the AuthenticatedRouteMixin. With this, all sub routes are automatically protected. Now I only want to make /show accessable. I know that I could use a mixin on /create and /edit and remove it from posts route, but if you have 10+ nested routes and only 1 of them should be available also for not logged in users, it's kind of inconvenient.

Do you know any other solution to that challenge?

If not, I think I have to write an additional mixin for that...

Thanks!




Aucun commentaire:

Enregistrer un commentaire