lopatin96/laravel-sitemap
最新稳定版本:1.0.8
Composer 安装命令:
composer require lopatin96/laravel-sitemap
包简介
Laravel sitemap
README 文档
README
Publish config
php artisan vendor:publish --tag="laravel-sitemap-config"
and specify your sitemap settings in config/sitemap.php
Link to sitemap
Your sitemap.xml file is under http:://127.0.0.1/sitemap.xml`
Publishing
Config
php artisan vendor:publish --tag="laravel-sitemap-config"
Custom pages
Set custom_pages to true in config/sitemap.php and add a class to your project:
namespace App\Services\SitemapCustomPages; use App\Models\Item; class SitemapCustomPages extends \Atin\LaravelSitemap\Services\SitemapCustomPages { public function addPages(): void { Item::get()->each(function ($item) { $this->pages->push([ 'url' => url("/offers/$item->slug"), 'last_modified' => $item->updated_at, ]); }); } }
统计信息
- 总下载量: 7.64k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-05-20