This repository has been archived by the owner on Sep 17, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Home
Mario Bašić edited this page Jul 7, 2017
·
27 revisions
Tired of unstable and bloated PHP sitemap packages?
Look no more!
Bard is the simplest PHP Sitemap package, just add some URLs and you are ready to go. Did I mention that it supports multilingual locations aka hreflangs.
use Laravelista\Bard\UrlSet;
use Sabre\Xml\Writer;
use Carbon\Carbon;
$sitemap = new UrlSet(new Writer);
$sitemap->addUrl('http://domain.com/contact')
->setPriority(0.8)
->setChangeFrequency('hourly')
->setLastModification(Carbon::now())
->addTranslation('hr', 'http://domain.com/hr/contact');
$sitemap->render()->send();
Run this from your project root in command line:
composer require laravelista/bard
- The cool image with Bard flying and Bard logo are from Bard, the Wandering Caretaker revealed website.