F
Filament10mo ago
vitali

FileUpload component form custom Model

Hi guys, I have 2 tables: 1. listings 2. photos I want to use original FileUpload component, meaning I will store my images into photos table. Images upload correctly , but how I can save the data inside Photo.php model after upload? FileUpload::make('photos') ->disk('public') ->columnSpan('full') ->multiple() ->minFiles(1) ->maxFiles(15) ->reorderable() ->visibility('public'), class Photo extends Model { use HasFactory; protected $fillable = [ 'listing_id', 'uid', 'name', 'file_name', 'position' ]; }
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server