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 1mo ago

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

Maintenance28

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity17

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://www.gravatar.com/avatar/f5b9321f4165b056b74d20c4bdfcd4c7c6255af47c37556163fc0f2bdc9f891b?d=identicon)[krishanujadiya](/maintainers/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

[stevenmaguire/zurb-foundation-laravel

Build HTML form elements for Foundation inside Laravel

203.8k](/packages/stevenmaguire-zurb-foundation-laravel)

PHPackages © 2026

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