foreach ($file as $f) {
$filename = Str::random(20) .'.' . $f->getClientOriginalExtension() ?: 'png';
$img = ImageInt::make($f);
$img->resize(500,500)->save($path . $filename);
$image = new Image();
$image->path = '/uploads/product_images/'.$filename;
$image->title = $request->input('title');
dd($product->id);
$image->product_id = $product->id;
$image->save();
}