Skip to content

Commit

Permalink
Merge branch 'hotfix/1.4.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
werner-freytag committed Jun 6, 2023
2 parents cfe9f53 + d814237 commit 53122bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion routes/web.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<?php

use Illuminate\Support\Facades\Route;
use Pecotamic\Sitemap\Http\Controllers\SitemapController;
use Statamic\Facades\Site;
use Statamic\Facades\URL;

Site::all()->map(function ($site) {
return URL::makeRelative($site->url());
})->unique()->each(function ($sitePrefix) {
Route::group(['prefix' => $sitePrefix], static function () {
Route::get(config('pecotamic.sitemap.url'), 'Pecotamic\\Sitemap\\Http\\Controllers\\SitemapController@show');
Route::get(config('pecotamic.sitemap.url'), [SitemapController::class, 'show']);
});
});

0 comments on commit 53122bd

Please sign in to comment.