Does configureUsing work on Filament\Panel?

I'm using a logo on my panel which works fine if I set it in the panel() method of the PanelProvider. But since i'm going to want the same on every panel, I'm trying to set them in a global Service Provider. To keep things separate, I created a new provider and added this:

public function boot(): void
{
    Panel::configureUsing(function (Panel $panel) {
        return $panel
            ->brandLogo(asset('img/hrlink-logo.svg'))
            ->darkModeBrandLogo(asset('img/hrlink-logo-light.svg'));
    }, isImportant: TRUE
    );
}


I initially tried it without the isImportant but saw that mentioned elsewhere so I gave it a shot. No joy. I've also tried it in AppServiceProvider just to rule out any problems with the new one but same result.

I also added a log line at the top of the boot() method to verify that it's getting called and it is. Multiple times.

Any thoughts on why the config is not being picked up?
Solution
Probably the AppServiceProvider is already too late because the panel is configured in a ServiceProvider too. Can you try this in register() method?
Was this page helpful?