diff --git a/app/common/service/PostService.php b/app/common/service/PostService.php index 1d5b3d5..857f69b 100644 --- a/app/common/service/PostService.php +++ b/app/common/service/PostService.php @@ -132,8 +132,8 @@ class PostService foreach ($media as $v) { PostMedia::create([ 'post_id' => $res->id, - 'media_type' => $this->getMediaTypeByUrl($v['url']), - 'url' => $v['url'], + 'media_type' => $this->getMediaTypeByUrl($v), + 'url' => $v, ]); } }