F
FilamentLeonardy

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
No description
Solution
Lara Zeus
Lara Zeus15d ago
FilamentPHP Glow
let users select a color for the panel
LeandroFerreira
LeandroFerreira15d ago
maybe using $panel->bootUsing(function(){..}) in the panel..
Leonardy
Leonardy15d ago
Thank you very much!
Leonardy
Leonardy15d ago
Have you tested it yet? I didn't understand these two returns in the middleware
Lara Zeus
Lara Zeus15d ago
you mean return $next($request); ? it the default return for all laravel middleware it mean continue the next request
Leonardy
Leonardy14d ago
would it look like this?
No description
awcodes
awcodes14d ago
Just put the FilamentColor inside the if and don’t use ! To negate it. Also not sure what constant() is doing.
If($request->user) {
FilamentColor::register([
‘primary’ => Color::hex($request->user->primary_color)
])
}
If($request->user) {
FilamentColor::register([
‘primary’ => Color::hex($request->user->primary_color)
])
}
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.
Leonardy
Leonardy14d ago
Got it, thanks for the contribution. I'll do some tests here
Want results from more Discord servers?
Add your server
More Posts
Custom ValidationMessages for minDate/maxDateI have tried the following, but the html5 validation still shows the default browser error. Do i neeModal actionHow can I do this in a modal window, since there is no ->columns() optionRepeater and auto-increment fieldI have a form with a repeater and I have a field for the number of the element. I want that field tBuild not picking up my Theme CSSI've added this plugin https://filamentphp.com/plugins/mokhosh-kanban and I'm updating the card viewMarkdownEditor not recognising inputI have a Form with a Markdown Editor, it is a required field. When I enter some text and try to savCustom Save Button for Create/Edit with Disable on FileUploadHello Filament Friends, I have a problem with implementing different Save Buttons. My process shoulImage Gallery On Modal like ImageColumnI have to make an image selector to which I pass a collection like this ImageProduct::all() where How can I add fields to / extend a resource from a pluginI want to add a form field to an existing module/plugin we are using. I already tried extending the I can't land home page.When I install the database and try to land homepage, I fails.Attachments concept tipsHello everyone, this is my first post so sorry if I make some mistakes. I've some entities that haveIs it possible to have tabs that look like sub-navigation?I want to have an edit page where I can change form by tabs that have the styling from sub-navigatioHow I can enable the Relation Manager Action in view mode?Normally, it is new action button is seen when it is in Edit mode. For user experience I would like Connecting the media library with entities?I have a resource for product reviews that lists review, each review might have some images with it.Custom BulkActionHi guys, newbie here... in a table i would like to pass the selected record to a controller and thenCallback on resource creation in modalHi, I'm creating a resource and rather than using a dedicated create page I'm using a modal window. Multiple Select that creates on submitI have a Select in a form that allows users to attach Skill resources to themselves. ``` Select::makNotifications Markup not working as expected?I'm using this and getting this: ` Notification::make() ->title('Summer SHeader action on section to go back on a specific step on a Wizard FormHello, I was wondering if it was possible, in a Wizard Form, to have a button that would allow you tModal Action inside Slideover [BUG]I have issue when I click modal inside Slideover , the page hangs . Would it be possible to achievI can't formatState of TextColumn having value null```TextColumn::make('last_contacted')->date('M d')->label('Last Attempt')->sortable()->formatStateUs