Spatie Settings not loading within AdminPanelServiceProvider
Greetings, I've been dynamically loading certain things to let the user customise the panel to their needs, however, after updating the composer it has stopped working. So as an example, I am no longer able to use
app(GeneralSettings::class)->name
to load something as it has no connection.7 Replies
What exactly are you trying to control via settings? Can you share the code that was working before the update?
Greetings, this is the code I had
I'm not completely sure but I think you can do these steps in
bootUsing()
:
Cheers, that works
I am trying to change panel color with this way and not working the following code
->bootUsing(function ($panel) {
$general_settings = app(GeneralSettings::class); $panel->brandName($general_settings->site_name);
$panel->favicon(asset('storage/'.$general_settings->theme_favicon)); $panel->colors([ 'primary' => $general_settings->theme_color, ]) ; }) Do you have any advice?
$general_settings = app(GeneralSettings::class); $panel->brandName($general_settings->site_name);
$panel->favicon(asset('storage/'.$general_settings->theme_favicon)); $panel->colors([ 'primary' => $general_settings->theme_color, ]) ; }) Do you have any advice?
For the color, I think you can use
FilamentColor::register()
, here's an example: https://discord.com/channels/883083792112300104/1150491658044051606/1150531056680829049Thank you, it is working!