Files
SkinbaseNova/app/Http/Controllers/Web/HomeController.php
2026-02-27 09:46:51 +01:00

39 lines
1.2 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
declare(strict_types=1);
namespace App\Http\Controllers\Web;
use App\Http\Controllers\Controller;
use App\Services\HomepageService;
use Illuminate\Http\Request;
final class HomeController extends Controller
{
public function __construct(private readonly HomepageService $homepage) {}
public function index(Request $request): \Illuminate\View\View
{
$user = $request->user();
$sections = $user
? $this->homepage->allForUser($user)
: $this->homepage->all();
$hero = $sections['hero'];
$meta = [
'title' => 'Skinbase Digital Art & Wallpapers',
'description' => 'Discover stunning digital art, wallpapers, and skins from a global community of creators. Browse trending works, fresh uploads, and beloved classics.',
'keywords' => 'wallpapers, digital art, skins, photography, community, wallpaper downloads',
'og_image' => $hero['thumb_lg'] ?? $hero['thumb'] ?? null,
'canonical' => url('/'),
];
return view('web.home', [
'meta' => $meta,
'props' => $sections,
'is_logged_in' => (bool) $user,
]);
}
}