Check if user needs to be logged in

Hello everyone,

I am trying to check if the user needs to be logged in for a specific route in the database.

Personally I think I am failing getting my check fixed.
So if somebody can check out my code and give me a push in the right way.

Here is a link to the code : http://laravel.io/bin/qQWBk

Best regards.

The right way to do that would be to add the routes as actual routes to the router and protect them via a piece of middle ware. I think you could also opt to use custom route matcher.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.