feat: ship creator journey v2 and profile updates

This commit is contained in:
2026-04-12 21:42:07 +02:00
parent a2457f4e49
commit d5cff21ea2
335 changed files with 20147 additions and 1545 deletions

View File

@@ -3,23 +3,39 @@
namespace App\Http\Controllers;
use App\Models\Category;
use App\Models\ContentType;
use App\Services\ArtworkService;
use App\Services\ContentTypes\ContentTypeSlugResolver;
use Illuminate\Http\Request;
class CategoryPageController extends Controller
{
public function __construct(private ArtworkService $artworkService)
public function __construct(
private ArtworkService $artworkService,
private ContentTypeSlugResolver $contentTypeResolver,
)
{
}
public function show(Request $request, string $contentTypeSlug, ?string $categoryPath = null)
{
$contentType = ContentType::where('slug', strtolower($contentTypeSlug))->first();
if (! $contentType) {
$resolution = $this->contentTypeResolver->resolve($contentTypeSlug);
if (! $resolution->found() || $resolution->contentType === null) {
abort(404);
}
$contentType = $resolution->contentType;
if ($resolution->requiresRedirect()) {
$target = url('/' . trim($contentType->slug . '/' . trim((string) $categoryPath, '/'), '/'));
$queryString = $request->getQueryString();
if ($queryString) {
$target .= '?' . $queryString;
}
return redirect()->to($target, 301);
}
$sort = (string) $request->get('sort', 'latest');