outl1ne / nova-settings

A Laravel Nova tool for editing custom settings using native Nova fields.
MIT License
271 stars 99 forks source link

Is the author no longer maintaining it? #188

Closed beiaduo closed 5 days ago

beiaduo commented 1 week ago

I have been using this plug-in for more than three years and it has always been stable. There are always problems with default values.

Tarpsvo commented 5 days ago

There's no reasonable way to add default values besides you yourself creating a migration that puts the values directly using SQL or via nova_set_setting_value() into the database. If the form would show the value you set using ->default() on the Field, it doesn't correlate to receiving the same value using nova_get_setting(), since the database might be empty. So it's better to have the sacrifice of having the ->default() not show anything.

In my eyes the best way to have "default" values is to just add them to the database when you add the field to the settings panel.