Side Nav vs Top Nav per user?

I know this seems like an odd request but is there any way or plugin to basically toggle if its side nav or tap nav on a per user basis like a dark/light theme preference?
Solution:
You can store the preference in a session and use a middleware to handle this.. ```php public function handle(Request $request, Closure $next): Response {...
Jump to solution
2 Replies
Solution
LeandroFerreira
You can store the preference in a session and use a middleware to handle this..
public function handle(Request $request, Closure $next): Response
{
$currentPanel = filament()->getCurrentPanel();

if (...) {
$currentPanel->topNavigation();
}

return $next($request);
}
public function handle(Request $request, Closure $next): Response
{
$currentPanel = filament()->getCurrentPanel();

if (...) {
$currentPanel->topNavigation();
}

return $next($request);
}
Add the middleware in your panel $panel->middleware([CustomMiddleware:class])
Joshua
JoshuaOP2w ago
:thinksmart: Thank you good sir

Did you find this page helpful?