'Add Uri into created sitemap in laravel
This is my first time of asking any question. I've generate daily sitemap using "spatie/laravel-sitemap" package. I want to add url of the new post when admin create a new post into sitemap.
I want to import uri into already created sitemap-file.
reference of the creating sitemap : https://github.com/spatie/laravel-sitemap
I've tried this :
Sitemap::create()
->add(Url::create('/home')
->setLastModificationDate(Carbon::yesterday())
->setChangeFrequency(Url::CHANGE_FREQUENCY_YEARLY)
->setPriority(0.1))
->writeToFile('sitemap.xml');
but it was create a new sitemap file
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
