outl1ne / nova-settings

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

Files do not get deleted, whenever you group the file field into a Panel #149

Closed holyboly closed 1 year ago

holyboly commented 1 year ago

If you group the file / image field into a Panel like this:

Panel::make(__('CompanyInformation'), [
    Image::make(__('Logo'), 'company_logo')->prunable(),
]),

Then the deleteImage method from the SettingsController does not recognize the field, but the panel, which does not has an attribute with the field name:

$field = collect(NovaSettings::getFields($pathName))->firstWhere('attribute', $fieldName);

Cannot overwrite the Controller myself afaik.

hayatbiralem commented 1 year ago

Same issue with the eminiarts/nova-tabs field.

Tarpsvo commented 1 year ago

Fixed by @marttinnotta in version 5.1.0. Good luck!