Hi everyone, How to enable darkmode only for admin users? thanks
Solution
I think you need to create a middleware and apply it according to this role...
public function handle(Request $request, Closure $next): Response{ filament()->getCurrentPanel()->darkMode(auth()->user()->is_admin); return $next($request);}
public function handle(Request $request, Closure $next): Response{ filament()->getCurrentPanel()->darkMode(auth()->user()->is_admin); return $next($request);}