PHPackages                             krishanujadiya/sitemap-generator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. krishanujadiya/sitemap-generator

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

krishanujadiya/sitemap-generator
================================

A Laravel package to generate sitemaps dynamically.

00PHP

Since Aug 4Pushed 1y ago1 watchersCompare

[ Source](https://github.com/krishanujadiya/sitemap-generator)[ Packagist](https://packagist.org/packages/krishanujadiya/sitemap-generator)[ RSS](/packages/krishanujadiya-sitemap-generator/feed)WikiDiscussions main Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Sitemap Generator
=================

[](#sitemap-generator)

A Laravel package to generate sitemaps dynamically.

Installation
------------

[](#installation)

You can install the package via Composer:

```
composer require krishanujadiya/sitemap-generator

Usage
Publish the configuration file:

php artisan vendor:publish --provider="krishanujadiya\\SitemapGenerator\\Providers\\SitemapServiceProvider"
Generate a sitemap by passing URLs from your controller:

use krishanujadiya\SitemapGenerator\SitemapGenerator;

class YourController extends Controller
{
    public function generateSitemap()
    {
        $urls = [
            ['url' => 'https://example.com/page1', 'lastmod' => '2023-01-01'],
            ['url' => 'https://example.com/page2', 'lastmod' => '2023-02-01']
        ];

        SitemapGenerator::create($urls);
    }
}
Example provided
Register a route to generate the sitemap:

In routes/web.php:

use krishanujadiya\SitemapGenerator\Http\Controllers\SitemapController;

Route::get('/generate-sitemap', [SitemapController::class, 'create']);
Generate the sitemap:

Access the /generate-sitemap URL and pass URLs as query parameters to generate the sitemap, which will be saved to the public disk.

Configuration
Edit the config/sitemap.php file to set changefreq and priority:

return [
    'changefreq' => env('SITEMAP_CHANGEFREQ', 'daily'),
    'priority' => env('SITEMAP_PRIORITY', '0.8'),
];
You can also set these variables in your .env file:

SITEMAP_CHANGEFREQ=daily
SITEMAP_PRIORITY=0.8
```

###  Health Score

13

—

LowBetter than 1% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity18

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/77289533?v=4)[krishanujadiya](/maintainers/krishanujadiya)[@krishanujadiya](https://github.com/krishanujadiya)

---

Top Contributors

[![krishanujadiya](https://avatars.githubusercontent.com/u/77289533?v=4)](https://github.com/krishanujadiya "krishanujadiya (2 commits)")

### Embed Badge

![Health badge](/badges/krishanujadiya-sitemap-generator/health.svg)

```
[![Health](https://phpackages.com/badges/krishanujadiya-sitemap-generator/health.svg)](https://phpackages.com/packages/krishanujadiya-sitemap-generator)
```

###  Alternatives

[zschuessler/laravel-route-to-class

A Laravel view composer that will convert the current route to a body class. 'admin/product/5/edit' becomes 'admin-product-edit'

26430.1k1](/packages/zschuessler-laravel-route-to-class)[serafim/properties

PHP properties implementation

779.1k1](/packages/serafim-properties)[codefog/contao-mobile_menu

mobile\_menu extension for Contao Open Source CMS

2140.4k](/packages/codefog-contao-mobile-menu)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
