承接 tahsingokalp/laravel-sitemap 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

tahsingokalp/laravel-sitemap

最新稳定版本:V12.0.0

Composer 安装命令:

composer require tahsingokalp/laravel-sitemap

包简介

Sitemap generator for Laravel

README 文档

README

Packagist Version run-tests PHP ^8.0

Laravel Sitemap

This is a Laravel 8, 9 and 10 only fork of Laravelium/laravel-sitemap. The original repository has been abandoned.

PHP ^8.0 is required.

Installation

If laravelium/sitemap is already part of the project:

composer remove laravelium/sitemap

Then run:

composer require tahsingokalp/laravel-sitemap
php artisan vendor:publish --provider="TahsinGokalp\Sitemap\SitemapServiceProvider"

Generate a simple sitemap

Route::get('mysitemap', function() {
    $sitemap = resolve("sitemap");

    $sitemap->add(URL::to(), '2012-08-25T20:10:00+02:00', '1.0', 'daily');
    $sitemap->add(URL::to('page'), '2012-08-26T12:30:00+02:00', '0.9', 'monthly');

    $posts = DB::table('posts')->orderBy('created_at', 'desc')->get();

    foreach ($posts as $post) {
        $sitemap->add($post->slug, $post->modified, $post->priority, $post->freq);
    }

    // generate (format, filename)
    // sitemap.xml is stored within the public folder
    $sitemap->store('xml', 'sitemap');
});

Examples

and more in the Wiki.

统计信息

  • 总下载量: 255
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 275
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-03-22