2017 © Pedro Peláez
 

library laravel-news-sitemap

A simple Google News Sitemap generator for Laravel.

image

cviebrock/laravel-news-sitemap

A simple Google News Sitemap generator for Laravel.

  • Tuesday, October 7, 2014
  • by cviebrock
  • Repository
  • 1 Watchers
  • 3 Stars
  • 4,266 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 3 Versions
  • 1 % Grown

The README.md

laravel-news-sitemap

A Google News sitemap generator for Laravel 4., (*1)

Build Status Total Downloads Latest Stable Version, (*2)

Installation

Add the package to your composer.json file:, (*3)

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

Add the service provider to app/config/app.php, (*4)

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

Publish the configuration file:, (*5)

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

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

Please use Github for bugs, comments, suggestions., (*6)

  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.

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

Copyright 2014 Colin Viebrock, (*8)

The Versions

07/10 2014

dev-master

9999999-dev

A simple Google News Sitemap generator for Laravel.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel google news sitemap

07/10 2014

0.9.1

0.9.1.0

A simple Google News Sitemap generator for Laravel.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel google news sitemap

07/10 2014

0.9.0

0.9.0.0

A simple Google News Sitemap generator for Laravel.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel google news sitemap