Implement creator studio and upload updates

This commit is contained in:
2026-04-04 10:12:02 +02:00
parent 1da7d3bf88
commit 0b216b7ecd
15107 changed files with 31206 additions and 626514 deletions

View File

@@ -0,0 +1,49 @@
<?php
declare(strict_types=1);
namespace App\Services\Sitemaps;
use Illuminate\Http\Response;
final class SitemapXmlRenderer
{
/**
* @param list<SitemapIndexItem> $items
*/
public function renderIndex(array $items): string
{
return \view('sitemaps.index', [
'items' => $items,
])->render();
}
/**
* @param list<SitemapUrl> $items
*/
public function renderUrlset(array $items): string
{
return \view('sitemaps.urlset', [
'items' => $items,
'hasImages' => \collect($items)->contains(fn (SitemapUrl $item): bool => $item->images !== []),
])->render();
}
/**
* @param list<GoogleNewsSitemapUrl> $items
*/
public function renderGoogleNewsUrlset(array $items): string
{
return \view('sitemaps.news-urlset', [
'items' => $items,
])->render();
}
public function xmlResponse(string $content): Response
{
return \response($content, 200, [
'Content-Type' => 'application/xml; charset=UTF-8',
'Cache-Control' => 'public, max-age=' . max(60, (int) \config('sitemaps.cache_ttl_seconds', 900)),
]);
}
}