How to change color palette dynamically
My application is multitenant and I would like to change the color palettes according to the client, I currently change them in the serviceprovider, could anyone help me how to change the dynamic pain
8 Replies
Solution
maybe this will help?
https://filamentglow.com/trick/dynamic-color-for-panels-per-users-1837d9c6
maybe using
$panel->bootUsing(function(){..})
in the panel..Thank you very much!
Have you tested it yet? I didn't understand these two returns in the middleware
you mean
return $next($request);
?
it the default return for all laravel middleware
it mean continue the next request
would it look like this?
Just put the FilamentColor inside the if and don’t use ! To negate it.
Also not sure what constant() is doing.
Something like that. You have to be aware of if the color is actually registered with Filament or not.
Also depends on how the color is stored for the user. Is it a key, hex or rgb.
Got it, thanks for the contribution. I'll do some tests here