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' ]; }
Was this page helpful?