PHP code example of artjoker / sitemap

1. Go to this page and download the library: Download artjoker/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/ */

    

artjoker / sitemap example snippets


php artisan vendor:publish --tag=sitemap-migrations
php artisan vendor:publish --tag=sitemap-styles



class Pages extends Model
{
    use Sitemap;
}

    public function getUrls() : array
    {
        return $urls;
    }

    public function makeUrl($baseUrl, $item) : string
    {
        return $url
    }

    php artisan sitemap:load:urls 

    php artisan sitemap:load:urls --model=App/Models/Pages

    php artisan sitemap:generate

php artisan vendor:publish --tag=sitemap-config
php artisan vendor:publish --tag=sitemap-lang
php artisan vendor:publish --tag=sitemap-migrations
php artisan vendor:publish --tag=sitemap-styles
php artisan vendor:publish --tag=sitemap-views