I've just added Route groups to my route file in Laravel and now when I attempt to load my website, I get a message that says "Firefox has detected that the server is redirecting the request for this address in a way that will never complete."
I'm not sure why this is, can anyone see any errors in my routes file?
code redacted
One thing I tried that seemed to work but didn't make sense was return
ing each of the Route::get()
calls inside of these. Is there something I'm doing wrong?
edit: When I edit the root
route in the After Authentication Routes commented area to route to the StaticController@getIndex
method, it works. Am I using the group filter incorrectly?
I've solved this.
After taking a look at what the auth
filter actually is...
Route::filter('auth', function() {
if (Auth::guest()) return Redirect::guest('login');
});
I realized that I was using it wrong.
If anyone else runs into this problem, the auth
filter checks if a user is logged in, and if not, it redirects them to a login page (my problem was I was trying to access the login page while not logged in, causing an infinite loop.)