I have just upgraded from laravel 5.8 to 6.0.0 and I'm tying to store images to the database but I get an error Invalid header value type; must be a string or numeric; received NULL
from vendor/zendframework/zend-diactoros/src/HeaderSecurity.php" line: 139
. Does anyone have an idea why I'm getting this?
Controller
if($request->hasFile('files')){
$store_file = [];
$files = $request->file('files');
foreach ($files as $file) {
$images = $file->store('public/photos');
$store_file[] = [
'product_id' => $product->id,
'filename' => $images
];
}
ProductsPhoto::insert($store_file);
}
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire