antonioribeiro / health

Laravel Health Panel
BSD 3-Clause "New" or "Revised" License
1.95k stars 197 forks source link

Auth middleware does not work #149

Open rocramer opened 5 years ago

rocramer commented 5 years ago

If I try to apply the auth middleware to the routes, I get redirected to the home page even though I'm logged in. The auth.basic middleware is working fine.

Is this a known issue or am I doing something wrong?

Thanks!

OlexandrPopov commented 3 years ago

You also need to apply web middleware.

[
    'uri' => "{$route_prefix}/panel",
    'name' => 'pragmarx.health.panel',
    'action' => "{$namespace}@panel",
    'middleware' => [
        'web',
        'auth',
    ],
],