PHP code example of artisan / jigsaw-sitemap

1. Go to this page and download the library: Download artisan/jigsaw-sitemap library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

artisan / jigsaw-sitemap example snippets


use Artisan\Jigsaw\Sitemap;

(new Sitemap($container))->collections('posts')->create();

(new Sitemap($container))->fill([
    [
        'loc'        => 'https://example.com',
        'lastmod'    => '2014-01-1',
        'changefreq' => 'weekly',
    ]
])->collections('posts', 'donuts')->create();