Files
HolidayParks/routes/web.php
T
Mark Gregory 17cc4a7bc0
tests / ci (push) Canceled after 0s
initial commmit google
2026-09-30 15:34:16 +01:00

33 lines
1.8 KiB
PHP

<?php
use App\Http\Controllers\EvidenceSubmissionController;
use Illuminate\Support\Facades\Route;
Route::view('/', 'pages.home')->name('home');
Route::view('/valuations', 'pages.valuations')->name('valuations');
Route::view('/park-holidays-uk', 'pages.park-holidays')->name('park-holidays');
Route::view('/owner-stories', 'pages.owner-stories')->name('owner-stories');
Route::view('/know-your-rights', 'pages.rights')->name('rights');
Route::view('/evidence', 'pages.evidence')->name('evidence');
Route::get('/submit-evidence', [EvidenceSubmissionController::class, 'create'])->name('evidence.create');
Route::post('/submit-evidence', [EvidenceSubmissionController::class, 'store'])->name('evidence.store')->middleware('throttle:5,1');
Route::get('/sitemap.xml', function () {
$lastModified = now()->toDateString();
$urls = [
['loc' => route('home'), 'lastmod' => $lastModified, 'changefreq' => 'weekly', 'priority' => '1.0'],
['loc' => route('valuations'), 'lastmod' => $lastModified, 'changefreq' => 'monthly', 'priority' => '0.9'],
['loc' => route('park-holidays'), 'lastmod' => $lastModified, 'changefreq' => 'monthly', 'priority' => '0.9'],
['loc' => route('owner-stories'), 'lastmod' => $lastModified, 'changefreq' => 'weekly', 'priority' => '0.8'],
['loc' => route('rights'), 'lastmod' => $lastModified, 'changefreq' => 'monthly', 'priority' => '0.8'],
['loc' => route('evidence'), 'lastmod' => $lastModified, 'changefreq' => 'weekly', 'priority' => '0.8'],
['loc' => route('evidence.create'), 'lastmod' => $lastModified, 'changefreq' => 'monthly', 'priority' => '0.6'],
];
$xml = view('sitemap', compact('urls'))->render();
return response($xml, 200)
->header('Content-Type', 'application/xml; charset=UTF-8');
})->name('sitemap');