Support the ongoing development of Laravel.io →
Authentication Security
Last updated 1 year ago.
0
Solution

Try creating a Route group with your auth middleware.

All routes in the group will be protected.

0

I was using route groups, so I have added it in there and it works fine :). Thanks for your help.

I'm still a bit confused about why I had to use a workaround though. Unless the fact that I am using route groups is the problem.

0

Sign in to participate in this thread!

Full Stack Europe

Your banner here too?

RedRay redray Joined 22 Dec 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2023 Laravel.io - All rights reserved.