outl1ne / nova-settings

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

Call to a member function authorize() on null #92

Closed bilogic closed 2 years ago

bilogic commented 2 years ago

The following example throws the Call to a member function authorize() on null exception

\OptimistDigital\NovaSettings\NovaSettings::addSettingsFields([
    Text::make('Some setting', 'some_setting'),
    Number::make('A number', 'a_number'),
]);

However, this works without issues

\OptimistDigital\NovaSettings\NovaSettings::make()
bilogic commented 2 years ago

addSettingsFields() returns null, it should not be static and return $this to allow chaining.

Tarpsvo commented 2 years ago

Hey! I think I need more of the stacktrace to debug this. Where is the exception thrown?