Wire admin studio SSR and search infrastructure

This commit is contained in:
2026-05-01 11:46:06 +02:00
parent 257b0dbef6
commit 18cea8b0f0
329 changed files with 197465 additions and 2741 deletions

View File

@@ -4,6 +4,7 @@ namespace App\Http\Controllers\Web\Posts;
use App\Http\Controllers\Controller;
use App\Services\Posts\PostHashtagService;
use App\Support\Seo\SeoFactory;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Cache;
use Inertia\Inertia;
@@ -11,13 +12,22 @@ use Inertia\Response;
class TrendingFeedController extends Controller
{
public function __construct(private PostHashtagService $hashtagService) {}
public function __construct(
private PostHashtagService $hashtagService,
private SeoFactory $seoFactory,
) {}
/** GET /feed/trending */
public function index(Request $request): Response
{
$trendingHashtags = Cache::remember('trending_hashtags', 300, fn () => $this->hashtagService->trending(10, 24));
$seo = $this->seoFactory->simplePage(
title: 'Trending Posts — ' . config('seo.site_name', 'Skinbase'),
description: 'Discover the most popular and engaging posts on Skinbase right now.',
canonical: url('/feed/trending'),
);
return Inertia::render('Feed/TrendingFeed', [
'auth' => $request->user() ? [
'user' => [
@@ -28,6 +38,7 @@ class TrendingFeedController extends Controller
],
] : null,
'trendingHashtags' => $trendingHashtags,
'seo' => $seo,
]);
}
}