#file becomes empty when using foreach loop

1 messages · Page 1 of 1 (latest)

trail solstice
#
foreach ($validated['product_logo'] as $key => $value) {
                // Store image
                dd($request->hasFile($key), $key, $value);
                if (!$request->hasFile($key)) {
                    continue;
                }

Why im trying to save the file inside the stored array but it becomes empty. Why is this?
I also did $request->hasFile($value) but is empty when debugging

#

This is the structure of the $validated fields

trail solstice
#

Call to a member function store() on null

#

I dont get why the attribute's value becomes empty when upon debugging it surely contains a file

trail solstice
#

file becomes empty when using foreach loop