You can install the package via composer:
composer require trinityrank/sitemap
This package has multilang support. It is compatibile with trinityrank/multilanguage
.
For default language we use config app.locale
value.
You need to publish file from package:
php artisan vendor:publish --provider="Trinityrank\Sitemap\SitemapServiceProvider" --tag="generate-sitemap-files"
And change settings array according to your needs
- Registrate MacrosServiceProvider in config/app.php
/* * Application Service Providers... */ App\Providers\MacrosServiceProvider::class
-
Now it is time to create your sitemap
php artisan sitemap:generate
-
You can also put it into your Kernel.php
$schedule->command('sitemap:generate')->dailyAt('03:00');
Please see CHANGELOG for more information on what has changed recently.
The MIT License (MIT). Please see License File for more information.