MonstreX/voyager-extension

VE Media Files are not working as well

Closed this issue · 6 comments

I've set the extra_fields option in JSON Bread Options. But the field input is still the same as the voyager original has. Also, I've installed the laravel-medialibrary & follow the migration instruction. But still not working.

image

Nothing change?

image

Even if I put an image:

image

Migration:

image

Model:

image

Tech stack

  • Laravel 9
  • MYSQL
  • The latest Voyager extension
  • Laravel media library 10

At first, you should upload selected images. Then you will see the uploaded images with appropriate controls.
ScreenClip

Error when saving the data. It seems that the field with input type VE Image doesn't return any value.

image

Bread options

image

I uploaded an image with name atm_bersama_logo.png:

image

I tried to use the string & json types for the header_logo_image column in migration, but both types still give the same error. Am I missing a step?

I forget to say, it doesn't matter which type has the field in your table (all related data save into media-table). But (!) it should be set to nullable (!) The field doesn't use indeed, but the name of the field uses as the name of media library. So you can chanhe the field type to tynyint, for example.

Woah, it works 🤩. Thank you very much.

image

Oh, I have one question. Does input type VE Image support custom extra_fields? Currently, it only has two fields: title & alt.

No problem. And nope, VE Image supports only those 2 fields. I recommend instead using VE Media Files, it is more flexible and extendable.

I'll close this issue. again, thank you @MonstreX