BlueForge
BlueForge
FFilament
Created by BlueForge on 7/10/2024 in #❓┊help
Using session in MenuItem
Hi is there any possibility to use session() or auth()->getSession() in MenuItem inside PanelProvider? Following code:
->userMenuItems([
'session' => MenuItem::make()
->label(auth()->getSession()->get('value')),
])
->userMenuItems([
'session' => MenuItem::make()
->label(auth()->getSession()->get('value')),
])
Produces error: Target class [hash] does not exist. If I use session() directly:
->userMenuItems([
'session' => MenuItem::make()
->label(session('value')),
])
->userMenuItems([
'session' => MenuItem::make()
->label(session('value')),
])
Then following error appears: Target class [cache] does not exist.
3 replies