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))
7 Replies
kalesha
kalesha3w ago
can some one please help me on this ⤴️ @Dennis Koch
Carl-bot
Carl-bot3w ago
kalesha_ has been warned, this is their first warning.
Bruno Pereira
Bruno Pereira3w ago
is Image_url in the $fillable array of the Model?
kalesha
kalesha3w ago
yes.
No description
Bruno Pereira
Bruno Pereira3w ago
maybe its a conflict with spatieimage plugin, can you try with the default fileupload?
kalesha
kalesha3w ago
with default fileupload image was updating in db but while retrieving image from db column wasn't working. thats why i had to shift to spatie media library. i tried many solutions from stackoverflow, laravel sites but none of them worked and its frustrating .... 🥹 with fileupload, if i have to show the image from signed url how can we achieve this ??
Bruno Pereira
Bruno Pereira3w ago
Sadly I can't help you with that because I don't know
Want results from more Discord servers?
Add your server