PHPackages                             elbgoods/laravel-sitemap - 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. elbgoods/laravel-sitemap

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

elbgoods/laravel-sitemap
========================

Sitemap generation based on laravel models

v1.0.0(5y ago)051MITPHPPHP ^7.4

Since Mar 10Pushed 5y ago3 watchersCompare

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

READMEChangelog (1)Dependencies (5)Versions (2)Used By (0)

Very short description of the package
=====================================

[](#very-short-description-of-the-package)

[![Latest Version on Packagist](https://camo.githubusercontent.com/1d423a4a69ba90f95c5e4ddf2ec9293bc052c6c01f4b2c77b02482974279c985/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f656c62676f6f64732f6c61726176656c2d736974656d61702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/elbgoods/laravel-sitemap)[![Build Status](https://camo.githubusercontent.com/060e102f48f0baeb1f494bd4991bca3c84e0c69704b43d63c9cc142192b0cd05/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f656c62676f6f64732f6c61726176656c2d736974656d61702f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/elbgoods/laravel-sitemap)[![Quality Score](https://camo.githubusercontent.com/558be120dd654289d57420765c8573a8899a0b89da0953e73b77dc164e3788a9/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f656c62676f6f64732f6c61726176656c2d736974656d61702e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/elbgoods/laravel-sitemap)[![Total Downloads](https://camo.githubusercontent.com/bb6fec4c5dfab27c0fea247609a9805219d9fe088c6d5407e7b296709baf5dcb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f656c62676f6f64732f6c61726176656c2d736974656d61702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/elbgoods/laravel-sitemap)

This is where your description should go. Try and limit it to a paragraph or two, and maybe throw in a mention of what PSRs you support to avoid any confusion with users and contributors.

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

[](#installation)

You can install the package via composer:

```
composer require elbgoods/laravel-sitemap
```

Configuration and Usage
-----------------------

[](#configuration-and-usage)

At first create a config file `config/sitemap.php` or get a bolilerplate file using

```
php artisan vendor:publish --provider="Elbgoods\LaravelSitemap\LaravelSitemapServiceProvider" --tag=config
```

### Add single page to sitemap

[](#add-single-page-to-sitemap)

A Sitemap url entry is represented by an array with following layout:

```
[
    'loc' => 'https://example.com/terms', // (required) url of the page,
    'lastmod' => Carbon::yesterday(), // (optional) last page modification
    'priority' => 0.9, // (optional) site priority
    'changefreq' => SitepageUrl::daily // (optional) page change frequency
]
```

### Add pages for models

[](#add-pages-for-models)

You can create a sitepage entry of each model item (e.g. all products if your store) by adding the model class name to the sitepage configuration array.

Your Model MUST implement the `Elbgoods\LaravelSitemap\Contracts\Sitemap` interface. This interface contains the method `getSitemapUrl()` which has to return the specific url for that model.

By default all model items will be entered in the sitemap.
You can filter the model items by using this function:

```
public static function getSitemapQuery(): Builder
```

### Generating Sitemap

[](#generating-sitemap)

You can generate a sitemap manually with this artisan command:

```
php artisan sitemap:generate > sitemap.xml
```

or use the Schedular:

```
$schedule->command('sitemap:generate')
    ->daily()
    ->sendOutputTo($filePath);
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Niclas Schirrmeister](https://github.com/elbgoods)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

Treeware
--------

[](#treeware)

You're free to use this package, but if it makes it to your production environment we would highly appreciate you buying or planting the world a tree.

It’s now common knowledge that one of the best tools to tackle the climate crisis and keep our temperatures from rising above 1.5C is to [plant trees](https://www.bbc.co.uk/news/science-environment-48870920). If you contribute to my forest you’ll be creating employment for local families and restoring wildlife habitats.

You can buy trees at [offset.earth/treeware](https://plant.treeware.earth/elbgoods/laravel-trashmail-rule)

Read more about Treeware at

Laravel Package Boilerplate
---------------------------

[](#laravel-package-boilerplate)

This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1889d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/eb5d60f7dd33ef3680490f11b3cd461b0c7a5dcddfe69d57fb1f6a3406be4570?d=identicon)[Gummibeer](/maintainers/Gummibeer)

![](https://www.gravatar.com/avatar/33a11c820ca1801a2b0cc065786385f9a1746ae02d1a120102ea7fc7f545eeb7?d=identicon)[Elbgoods](/maintainers/Elbgoods)

---

Top Contributors

[![eisfeuer](https://avatars.githubusercontent.com/u/12658491?v=4)](https://github.com/eisfeuer "eisfeuer (8 commits)")

---

Tags

laravel-sitemapelbgoods

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/elbgoods-laravel-sitemap/health.svg)

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

###  Alternatives

[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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