Closed pohnean closed 2 years ago
Thank you for your feature request and your submission.
However I would like to change your code a little bit:
if
wherever possible, so the $extraEntries
should always be initializedYour code has been added in release 1.4.0
This PR adds the ability to register new SitemapEntries programmatically.
This is useful when you have custom routes / controllers defined i.e.
Route::statamic('blog/authors/{slug}', 'authors.show');
The usage is similar to adding routes dynamically in Statamic's SSG add-on (https://github.com/statamic/ssg)
Here is an example of how to use it:
In
AppServiceProvider.php