如何在 laravel 网站中创建站点地图以帮助 google 找到我的网站

how to create sitemap in laravel website to help google found my website

我需要从数据库中读取数据的站点地图文件,例如假设我们有网站并且 google 搜索者找到了内容标题和 body,并显示所有网站链接。

我使用 spatie laravel/sitemap 包装:https://github.com/spatie/laravel-sitemap

只需按照自述文件中的步骤安装和实施即可。