File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -49,8 +49,11 @@ public function changeImageUrlInArticle()
49
49
$ articles = Article::all ();
50
50
51
51
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
+
54
57
$ article ->save ();
55
58
}
56
59
}
You can’t perform that action at this time.
0 commit comments