Skip to content

Commit 50d84ef

Browse files
committedJun 26, 2019
v1.0.10 4
1 parent 83f4225 commit 50d84ef

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed
 

‎app/Console/Commands/Test.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,11 @@ public function changeImageUrlInArticle()
4949
$articles = Article::all();
5050

5151
foreach ($articles as $article) {
52-
$article->content_raw = str_replace('http://images-1253193383.cosbj.myqcloud.com/', '/', $article->content_raw);
53-
$article->content_html = str_replace('http://images-1253193383.cosbj.myqcloud.com/', '/', $article->content_html);
52+
$article->content_raw = str_replace('http://images-1253193383.cosbj.myqcloud.com/', '/storage/images/', $article->content_raw);
53+
$article->content_html = str_replace('http://images-1253193383.cosbj.myqcloud.com/', '/storage/images/', $article->content_html);
54+
$article->content_raw = str_replace('http://images-1253193383.cos.ap-beijing.myqcloud.com/', '/storage/images/', $article->content_raw);
55+
$article->content_html = str_replace('http://images-1253193383.cos.ap-beijing.myqcloud.com/', '/storage/images/', $article->content_html);
56+
5457
$article->save();
5558
}
5659
}

0 commit comments

Comments
 (0)
Please sign in to comment.