mikicaivosevic/laravel-sitemap

Create and generate sitemaps with ease
18
Install
composer require mikicaivosevic/laravel-sitemap
Latest Version:2.2.3
PHP:^7.0
License:MIT
Last Updated:Aug 1, 2017
Links: GitHub  ·  Packagist
Maintainer: mikicaivosevic

Generate sitemaps with ease (spatie/laravel-sitemap FORK)

Installation

First, install the package via composer:

composer require mikicaivosevic/laravel-sitemap

Next up: installing the service provider

// config/app.php
'providers' => [
    ...
    Mikica\Sitemap\SitemapServiceProvider::class,
];

Manually creating a sitemap

You can also create a sitemap fully manual:

use Carbon\Carbon;

Sitemap::create()
   ->add('/page1')
   ->add('/page2')
   ->add(Url::create('/page3')->setLastModificationDate(Carbon::create('2016', '1', '1')))
   ->add(Url::create('/page4')->addXhtmlLink([
       'hreflang' => 'de',
       'rel'      => 'alternate'
       'href'     => 'http://www.example.com/deutsch/'
   ]))
   ->writeToFile($sitemapPath);

Credits

License

The MIT License (MIT). Please see License File for more information.

Related Packages

marilesbeard5/laravel-sitemap

Create and generate sitemaps with ease

8,053 0
myqaa/laravel-sitemap

Create and generate sitemaps with ease

1,546 0
spatie/laravel-sitemap

Create and generate sitemaps with ease

17,567,087 2,618
develop-carhelper/laravel-sitemap

Create and generate sitemaps with ease

49 0
spatie/laravel-permission

Permission handling for Laravel 12 and up

109,596,605 12,954