[ad_1]
I tried the following code but an error occurs when I run the project
$files = $request->file('files');
if($request->hasFile('files'))
{
foreach ($files as $file) {
$path = $file->store('public/gallery');
ProductGallery::create([
'products_id' => $product->id,
'url' => $path
]);
}
}
[ad_2]