Merhaba,laravel 8'de summernote kullanarak resim iceren article'lar yazmaya calisiyorum.
`
$description = $request->description;
$dom = new \DomDocument();
$dom->loadHtml($description, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
$images = $dom->getElementsByTagName('img');
foreach($images as $k => $img){
$data = $img->getAttribute('src');
list($type, $data) = explode(';', $data);
list(, $data) = explode(',', $data);
$data = base64_decode($data);
$image_name= "/upload/" . time().$k.'.png';
$path = public_path() . $image_name;
file_put_contents($path, $data);
$img->removeAttribute('src');
$img->setAttribute('src', $image_name);
}
$description = $dom->saveHTML();
`
boyle bir sey yaptim ama
DOMDocument::loadHTML() expects parameter 1 to be string, array given
hatasi verdi.Bunun disinda file manager kullanamaya calistim ama sanirim paketin laravel 8 icin suresi gecmis.