outl1ne / nova-settings

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

BUG: Closures not working any more #37

Closed JonathanDoelan closed 3 years ago

JonathanDoelan commented 3 years ago

Hello I’ve updated your package today and since then closures don’t work anymore:

// Using a callable
\OptimistDigital\NovaSettings\NovaSettings::addSettingsFields(function() {
  return [
    Text::make('Some setting', 'some_setting'),
    Number::make('A number', 'a_number'),
  ];
});

Inside Nova I’m getting „Closure object cannot have properties“

If I’m passing a class method, I’m getting “Undefined property: App\Nova\Settings\Settings::$panel” (where App\Nova\Settings\Settings is the class where all my fields are controlled)

Tarpsvo commented 3 years ago

Sec, looking into it.

Tarpsvo commented 3 years ago

Fixed in version 2.6.2 - there was indeed an issue with default path values. Sorry about that!