ultrono/laravel-sitemap
Laravel Sitemap
This is a Laravel 11, 12 and 13 only fork of Laravelium/laravel-sitemap. The original repository has been abandoned.
The package supports actively supported Laravel releases as per the official Laravel Support Policy.
Installation
If laravelium/sitemap is already part of the project:
composer remove laravelium/sitemap
Then run:
composer require ultrono/laravel-sitemap
php artisan vendor:publish --provider="Ultrono\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
- How to generate dynamic sitemap (with optional caching)
- How to generate BIG sitemaps (with more than 1M items)
- How to generate sitemap to a file
- How to use multiple sitemaps with sitemap index
and more in the Wiki.
Related Packages
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 10.0.0 | ^8.2 | ^11.0| | MIT | |
| 9.5.0 | ^8.0 | ^8.0| | MIT | |
| 9.4.0 | ^8.0 | ^8.0| | MIT | |
| 9.3.0 | ^8.0 | ^8.0 | | MIT | |
| 9.2.0 | ^8.0 | ^8.0 | | MIT | |
| 9.1.0 | ^8.0 | ^8.0 | | MIT | |
| 9.0.2 | ^8.0 | ^8.0 | | MIT | |
| 9.0.1 | ^8.0 | ^8.0 | | MIT | |
| 9.0.0 | ^8.0 | ^8.0 | | MIT | |
| 8.0.1 | >=7.3 | ^8.0 | MIT | |
| v7.0.1 | >=7.2 | ~7.0 | MIT | |
| v6.0.1 | >=7.2 | ~6.0 | MIT | |
| v3.1.1 | >=7.1.3 | ~5.8 | MIT | |
| v3.0.1 | >=7.1.3 | 5.7.* | MIT | |
| v2.8.3 | >=7.1.3 | 5.6.* | MIT | |
| v2.8.2 | >=7.1.3 | 5.6.* | MIT | |
| v2.8.1 | >=7.1.3 | 5.6.* | MIT | |
| v2.7.3 | >=7.0.0 | 5.5.* | MIT | |
| v2.7.2 | >=7.0.0 | 5.5.* | MIT | |
| v2.6.5 | >=5.5.9 | ~5 | MIT | |
| v2.6.4 | >=5.5.9 | ~5 | MIT | |
| v2.6.3 | >=5.5.9 | ~5 | MIT | |
| v2.6.2 | >=5.5.9 | ~5 | MIT | |
| v2.6.1 | >=5.5.9 | ~5 | MIT | |
| v2.5.8 | >=5.5.9 | ~5 | MIT | |
| v2.5.6 | >=5.5.9 | ~5 | MIT | |
| v2.5.5 | >=5.5.9 | ~5 | MIT | |
| v2.5.3 | >=5.4.0 | ~4| | MIT | |
| v2.5.2 | >=5.4.0 | ~4| | MIT | |
| v2.4.20 | >=5.4.0 | ~4| | MIT |
Showing the latest 30 of 34. See every release on Packagist