PHPackages                             megaads/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. megaads/sitemap-generator

ActiveLibrary

megaads/sitemap-generator
=========================

This package genernate sitemap.xml file automatically base on databse tables.

1.5.25(1mo ago)1554MITPHPPHP &gt;=5.6.4

Since Aug 30Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/megaads-vn/sitemap-generator)[ Packagist](https://packagist.org/packages/megaads/sitemap-generator)[ RSS](/packages/megaads-sitemap-generator/feed)WikiDiscussions master Synced today

READMEChangelog (5)DependenciesVersions (75)Used By (0)

Laravel 5 generate sitemap
==========================

[](#laravel-5-generate-sitemap)

This package generate sitemap.xml file automatically base on database table and route

Install and Configuration
-------------------------

[](#install-and-configuration)

Using composer command

```
 composer require megaads/sitemap-generator

```

After composer install package complete, open file app.php and add below line to `providers`:

```
 Megaads\Generatesitemap\GeneratesitemapServiceProvider::class

```

Then run this command to publish package config to application config folder (NOTE: Add option `--force` for overwrite config file. Be sure backup your config file before run with `--force` option):

```
php artisan vendor:publish --provider="Megaads\Generatesitemap\GeneratesitemapServiceProvider"

```

After run publish command open file `generate-sitemap.php`. IF NOT, CAN USING COMMAND TO COPY

```
cp vendor/megaads/generate-sitemap/config/generate-sitemap.php config/generate-sitemap.php

```

It see like this:

```

return [
 'multiplesitemap' => false,
 'defaultlocale' => '',
 'sitemaptype' => [
     'categories' => 'category',
     'stores' => 'store',
     'blogs' => 'blog'
 ],
 'locales' => [
     'us' => 'United States',
     'uk' => 'United Kingdom',
     'ca' => 'Canada',
     'fr' => 'France',
     'vn' => 'Vietnam',
 ],
 'routes' => [ // Add route name from routes.php for generate sitemap url automatically
     'store' => 'frontend::store::listByStore', // Show all stores
     'category' => 'frontend::category::listByCategory', // Show all categories
     'blog' => 'frontend::blog::detail', // Detail a blog
     'coupon' => 'frontend::coupon::detail', // Detail a coupon
     'store_n_keyword' =>  '/'
 ]
];

```

Default param `multiplesitemap` will be set to `false`, mean has single sitemap.xml was generator. If set it to `true`sitemap file will be generated to folder with name as key at `locales` param config. Create folder name `sitemap` in folder `public` and set `chmod 775` for this folder for create multiple locales folder.

Add this line to bottom of `app\config\app`:

```
'domain' => 'http://example.com'

```

Finally, go the below url to generate sitemap. File sitemap.xml will be generate automatically and save to public path. `multiplesitemap` is `false`: If separate sitemap to multiple file using param `is_multiple=true` on url when call it. (attension: config `sitemaptype` on file config).

```
//example.com/sitemap-generator
//example.com/sitemap-generator?is_multiple=true

```

Or `multiplesitemap` is `true`. This option allow to generate sitemap with multiple language.

```
//example.com/generator-all-sitemap

```

Or call to url below for generate all sitemap type (blogs, categories...) group by locales:

```
//example.com/sitemap/generator-by-locale

```

And can see result file with url `//example.com/sitemap.xml`

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance54

Moderate activity, may be stable

Popularity15

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 77.6% 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

Every ~38 days

Recently: every ~147 days

Total

73

Last Release

46d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/72ad425c743522a807fd15e2a7b0ada9c2a2127ecca76fbef37cf9292022006a?d=identicon)[megaads-vn](/maintainers/megaads-vn)

---

Top Contributors

[![bachnx23](https://avatars.githubusercontent.com/u/7134491?v=4)](https://github.com/bachnx23 "bachnx23 (66 commits)")[![tienanhbui](https://avatars.githubusercontent.com/u/22376801?v=4)](https://github.com/tienanhbui "tienanhbui (5 commits)")[![diem95](https://avatars.githubusercontent.com/u/25625286?v=4)](https://github.com/diem95 "diem95 (4 commits)")[![lapdx](https://avatars.githubusercontent.com/u/5915409?v=4)](https://github.com/lapdx "lapdx (4 commits)")[![maituyen1008](https://avatars.githubusercontent.com/u/44649641?v=4)](https://github.com/maituyen1008 "maituyen1008 (3 commits)")[![tuananhzippy](https://avatars.githubusercontent.com/u/13558393?v=4)](https://github.com/tuananhzippy "tuananhzippy (3 commits)")

### Embed Badge

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

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

PHPackages © 2026

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