fixed browse and tailwindcss style

This commit is contained in:
2026-02-15 11:01:19 +01:00
parent d114472823
commit 7734e53d87
16 changed files with 341 additions and 200 deletions

View File

@@ -53,24 +53,11 @@ class PhotographyController extends Controller
$tidy = $category->description ?? ($ct->description ?? null);
$perPage = 40;
$sort = (string) $request->get('sort', 'latest');
// Load artworks for the requested content type using standard pagination
try {
$artQuery = \App\Models\Artwork::public()
->published()
->whereHas('categories', function ($q) use ($ct) {
$q->where('categories.content_type_id', $ct->id);
})
->with([
'user:id,name',
'categories' => function ($q) {
$q->select('categories.id', 'categories.content_type_id', 'categories.parent_id', 'categories.name', 'categories.slug', 'categories.sort_order')
->with(['parent:id,parent_id,content_type_id,name,slug', 'contentType:id,slug,name']);
},
])
->orderByDesc('published_at');
$artworks = $artQuery->paginate($perPage)->withQueryString();
$artworks = $this->artworks->getArtworksByContentType($contentSlug, $perPage, $sort);
} catch (\Throwable $e) {
// Return an empty paginator so views using ->links() / ->firstItem() work
$artworks = new \Illuminate\Pagination\LengthAwarePaginator([], 0, $perPage, 1, [