Laravel 11 with teams: how to add middleware #2728
Unanswered
giacomomasseron
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Is |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
in Laravel 11 the default middlewares have been removed from the code.
I'm trying to use teams and to add the middleware written in the documentation (https://spatie.be/docs/laravel-permission/v6/basic-usage/teams-permissions)
I'm not able retrieve the logged user in the middleware.
This is what I tried without success (
laravel bootstrap/app.php
file):With this code, in the middleware,
auth()->user()
is null even if I'm authenticatedBeta Was this translation helpful? Give feedback.
All reactions