', 3600);
// 从数据库获取全部的博客文章
$blogs = Blog::where('published',1)->orderBy('created_at',...>add($url, $blog->updated_at,'1.0','daily');
}
// 渲染站点地图(options: 'xml' (default), 'html...', 'ror-rss', 'ror-rdf')
return $sitemap_contents->render('xml');
}
}
此功能会将所有已发布的博客放在站点地图中...100, $end = '...')]];
$sitemap_contents->add($url, $blog->updated_at,'1.0','daily',$images);
}
这会将图像数组添加到此站点地图中的每个博客项目...,要添加更多图片,您可以根据需要扩展该数组。