nova-settings icon indicating copy to clipboard operation
nova-settings copied to clipboard

Nova 5 Repeater Image field support

Open Inigo-van-Dijk opened this issue 7 months ago • 1 comments

I'm using Laravel 12.0 and Nova 5.0. The Image field via a Nova Repeater doesn't work with the outl1ne/nova-settings package.

I did find a workaround. Please see my fork https://github.com/Inigo-van-Dijk/nova-settings/commit/c397bed416c2ea5ebce73cc2a1f2601309e45457.

To make this work, two things must be added:

  1. To your Repeater field, add ->asJson()->uniqueField('uuid'), for example
Repeater::make('Clients', 'clients')
    ->repeatables([
        Client::make(),
    ])
    ->asJson()
    ->uniqueField('uuid')

And in your Repeater, in this example Client.php

public function fields(NovaRequest $request): array
{
    return [
        Hidden::make('uuid'),
        Image::make('Image', 'image'),
        // Any other fields you want
    ];
}

Now Images, and any Nova Repeater field works with this package.

Inigo-van-Dijk avatar Jun 04 '25 15:06 Inigo-van-Dijk

Just commenting to say I have run into the same issue and would appreciate a resolution

KLanger98 avatar Jun 06 '25 00:06 KLanger98