PHP code example of larapulse / sitemap-bundle
1. Go to this page and download the library: Download larapulse/sitemap-bundle 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/ */
larapulse / sitemap-bundle example snippets
# app/AppKernel.php
public function registerBundles()
{
$bundles = [
// ...
new Larapulse\SitemapBundle\LarapulseSitemapBundle(),
];
}
namespace SitemapGenerator\Provider;
use SitemapGenerator\Entity\Url;
use SitemapGenerator\Provider\ProviderInterface;
use SitemapGenerator\Sitemap\Sitemap;
class CustomProvider implements ProviderInterface
{
public function populate(Sitemap $sitemap)
{
$url = new Url();
$url->setLoc('http://www.google.de');
$url->setChangefreq(Url::CHANGEFREQ_NEVER);
$url->setLastmod('2012-12-19 02:28');
$sitemap->add($url);
}
}