PHPackages                             fuxu/larasitemap - 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. fuxu/larasitemap

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

fuxu/larasitemap
================

A simple sitemap generator for Laravel.

v0.1.2(8y ago)211MITPHPPHP &gt;=7.0.0

Since Jun 15Pushed 8y ago2 watchersCompare

[ Source](https://github.com/fuxu/larasitemap)[ Packagist](https://packagist.org/packages/fuxu/larasitemap)[ RSS](/packages/fuxu-larasitemap/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

LaraSitemap
===========

[](#larasitemap)

A very simple sitemap generator for Laravel 5 following [`Sitemaps XML format`](https://www.sitemaps.org/protocol.html)

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

[](#installation)

```
composer require fuxu/larasitemap
```

Register
--------

[](#register)

Add the following line to array `providers` in `config/app.php`

```
FuXu\LaraSitemap\SitemapServiceProvider::class,
```

API
---

[](#api)

### Sitemap

[](#sitemap)

```
void add(string $loc, string $lastmod, double $priority, string $changefreq)
```

TypeParameterDescriptionstring$locrequiredURL of the page. This URL must begin with the protocol (such as http) and end with a trailing slash, if your web server requires it. This value must be less than 2,048 characters.string$lastmodoptionalThe date of last modification of the file. This date should be in [`W3C Datetime format`](http://www.w3.org/TR/NOTE-datetime). This format allows you to omit the time portion, if desired, and use YYYY-MM-DD. Note that this tag is separate from the If-Modified-Since (304) header the server can return, and search engines may use the information from both sources differently.double$priorityoptionalThe priority of this URL relative to other URLs on your site. Valid values range from 0.0 to 1.0.string$changefreqoptionalHow frequently the page is likely to change. This value provides general information to search engines and may not correlate exactly to how often they crawl the page. Valid values are: `always`, `hourly`, `daily`, `weekly`, `monthly`, `yearly`, `never`.```
Response render($format)
```

TypeParameterDescriptionstring$formatoptionalThe output format. The default value is `urlset`. Valid values are: `urlset`, `sitemapindex`.Example
-------

[](#example)

```
