Update (post): Fix missing post date format

This commit is contained in:
2023-10-02 00:40:54 +08:00
parent cef72abf38
commit a47fe6992a

View File

@@ -202,8 +202,8 @@ public function post(Request $request, $country, $post_slug)
->setType('Article')
->addImage($post->featured_image)
->addValue('author', $post->author->name)
->addValue('datePublished', $post->publish_at)
->addValue('dateCreated', $post->publish_at)
->addValue('datePublished', $post->publish_at->format('Y-m-d'))
->addValue('dateCreated', $post->publish_at->format('Y-m-d'))
->addValue('dateModified', $post->updated_at->format('Y-m-d'))
->addValue('description', $post->excerpt)
->addValue('articleBody', trim(preg_replace('/\s\s+/', ' ', strip_tags($post->html_body))));