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

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

cviebrock/laravel-news-sitemap
==============================

A simple Google News Sitemap generator for Laravel.

0.9.1(11y ago)54.9k2MITPHPPHP &gt;=5.4

Since Oct 7Pushed 11y ago1 watchersCompare

[ Source](https://github.com/cviebrock/laravel-news-sitemap)[ Packagist](https://packagist.org/packages/cviebrock/laravel-news-sitemap)[ RSS](/packages/cviebrock-laravel-news-sitemap/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (3)Used By (0)

laravel-news-sitemap
====================

[](#laravel-news-sitemap)

A Google News sitemap generator for Laravel 4.

[![Build Status](https://camo.githubusercontent.com/e2d286247707bfc6daba6808bc900cf09953ff4b0a9295dff1692f3667ec54ce/68747470733a2f2f7472617669732d63692e6f72672f6376696562726f636b2f656c6f7175656e742d736c75676761626c652e737667)](https://travis-ci.org/cviebrock/laravel-news-sitemap)[![Total Downloads](https://camo.githubusercontent.com/a5c4e25f1768ebdc9dd8c21b7f3d0b4a2d406ef9c45405e2b15dce859e57b2d0/68747470733a2f2f706f7365722e707567782e6f72672f6376696562726f636b2f6c61726176656c2d6e6577732d736974656d61702f646f776e6c6f6164732e706e67)](https://packagist.org/packages/cviebrock/laravel-news-sitemap)[![Latest Stable Version](https://camo.githubusercontent.com/89f9f88676d4b7c2699d856bae4f0d369278a95636be93c2fb14238ad703ec93/68747470733a2f2f706f7365722e707567782e6f72672f6376696562726f636b2f6c61726176656c2d6e6577732d736974656d61702f762f737461626c652e706e67)](https://packagist.org/packages/cviebrock/laravel-news-sitemap)

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

[](#installation)

Add the package to your `composer.json` file:

```
'cviebrock/laravel-news-sitemap' => 'dev-master'

```

Add the service provider to `app/config/app.php`

```
'providers' => array(
    ...
    'Cviebrock\LaravelNewsSitemap\ServiceProvider',
);
```

Publish the configuration file:

```
php artisan config:publish cviebrock/laravel-news-sitemap
```

Sample Usage
------------

[](#sample-usage)

```
// create a new sitemap instance
$sitemap = \App::make('Cviebrock\LaravelNewsSitemap\NewsSitemap');

// if it's not cached, then populate with entries
if (!$sitemap->isCached()) {

    foreach (Posts::all() as $post) {

		$extras = [];
		$images = [];

		foreach ($post->images as $image) {
			$images[] = [
			    'loc' => $image->url,
			    'caption' => $image->caption
            ];
		}

		$extras['keywords'] = $post->topics->lists('name');

		$this->sitemap->addEntry($post->url, $post->title, $post->published_at, $extras, $images);
	}

}

// returns an XML response
return $sitemap->render();
```

Bugs, Suggestions and Contributions
-----------------------------------

[](#bugs-suggestions-and-contributions)

Please use Github for bugs, comments, suggestions.

1. Fork the project.
2. Create your bugfix/feature branch and write your (well-commented) code.
3. Commit your changes and push to your repository.
4. Create a new pull request against this project's `master` branch.

Copyright and License
---------------------

[](#copyright-and-license)

**laravel-news-sitemap** was written by Colin Viebrock and released under the MIT License. See the LICENSE file for details.

Copyright 2014 Colin Viebrock

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity49

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

Every ~0 days

Total

2

Last Release

4235d ago

### Community

Maintainers

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

---

Top Contributors

[![cviebrock](https://avatars.githubusercontent.com/u/166810?v=4)](https://github.com/cviebrock "cviebrock (1 commits)")

---

Tags

laravelgoogleSitemap news

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[watson/active

Laravel helper for recognising the current route, controller and action

3253.6M14](/packages/watson-active)[erlandmuchasaj/laravel-gzip

Gzip your responses.

40129.3k2](/packages/erlandmuchasaj-laravel-gzip)[glhd/conveyor-belt

14797.0k](/packages/glhd-conveyor-belt)[dragon-code/pretty-routes

Pretty Routes for Laravel

10058.7k4](/packages/dragon-code-pretty-routes)[bjuppa/laravel-blog

Add blog functionality to your Laravel project

483.3k2](/packages/bjuppa-laravel-blog)

PHPackages © 2026

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