dmitrybubyakin / nova-medialibrary-field

Laravel Nova field for managing the Spatie media library
MIT License
262 stars 62 forks source link

how to config customPropertiesFields ? #184

Open guoxiangke opened 11 months ago

guoxiangke commented 11 months ago

hi, how can I acheve like this, thanks!

image image
guoxiangke commented 11 months ago

@see https://github.com/ebess/advanced-nova-media-library


Files::make('Multiple files', 'multiple_files')
    ->customPropertiesFields([
        Boolean::make('Active'),
        Markdown::make('Description'),
    ]);

// custom properties without user input
Files::make('Multiple files', 'multiple_files')
    ->customProperties([
        'foo' => auth()->user()->foo,
        'bar' => $api->getNeededData(),
    ]);
dmitrybubyakin commented 11 months ago

@guoxiangke Try this https://github.com/dmitrybubyakin/nova-medialibrary-field#fields