FilamentF
Filament15mo ago
kalesha

Image path is not saving in table column

Section::make("Images")
->collapsible()
->schema([
Repeater::make('images')
->relationship('images')
->schema([
TextInput::make('size')
->required(),
SpatieMediaLibraryFileUpload::make('image_url')
->disk('r2')
->directory('product_images')
->collection('product_images')
->image()
->required(),
])
->addActionLabel('Add Image')
->defaultItems(3)
])
when try to save changes, image is uploading to cloudflare but path is not update rather i get error message
SQLSTATE[HY000]: General error: 1364 Field 'image_url' doesn't have a default value (Connection: mysql, SQL: insert into product_images (size, product_id,
updated_at
, created_at) values (111, 1, 2024-10-01 18:50:33, 2024-10-01 18:50:33))
Was this page helpful?