Give it a shot using Auth::user() or $request->user() or just clear your Cache. :)
Oct 14, 2024
5
Level 8
Cannot access authenticated user from within filament admin panel provider
When I use the following code:
$user = auth()->user();
from within the panel method of the AdminPanelProvider, I get null, even when the user is logged in. Here is my user model declaration:
class User extends Authenticatable implements FilamentUser
How do I access the currently logged in user from there?
Please or to participate in this conversation.