📌  相关文章
📜  addMediaFromBase64 不起作用 - 无论代码示例

📅  最后修改于: 2022-03-11 15:00:46.052000             🧑  作者: Mango

代码示例1
foreach ($data['images'] as $image) {
     $article->addMediaFromBase64($image)->toMediaCollection('article-images');
     $mediaItems = $article->load('media')->getMedia('article-images');
     $article->content = str_replace($image, $mediaItems[count($mediaItems) - 1]->getFullUrl(), $article->content);
}