Files
Atomcms-edit/app/Http/Controllers/Miscellaneous/HomeController.php
T
root c53a5a8a2c Complete Hubbly theme conversion: all pages rewritten with CSS variable theming
- Converted all views from Dusk components (x-content.content-card, x-form.*) to inline Hubbly style
- All pages use consistent card pattern: rounded-lg, gradient headers, color-mix borders
- Added Hubbly-style homepage with 2-column layout, login card, swiper news carousel
- Rewrote navigation with Alpine.js dropdowns, CSS variable colors, Hubbly assets
- Updated profile page with Hubbly cards, fixed data bugs (friend/guild relationships)
- Rewrote register page to match Hubbly layout: banner header, avatar preview with Frank GIF, 2-column form, avatar carousel selector, border-4 inputs
- Rewrote login, settings, help center, radio, applications, utility pages
- All colors use CSS variables controlled by Filament theme editor
- Added Hubbly assets: banner, Frank GIF, navigation icons, online badge
- Removed all dependencies on x-content.* and x-form.* components
2026-06-27 17:01:02 +02:00

41 lines
1.1 KiB
PHP
Executable File

<?php
namespace App\Http\Controllers\Miscellaneous;
use App\Http\Controllers\Controller;
use App\Models\Articles\WebsiteArticle;
use App\Models\Miscellaneous\CameraWeb;
use App\Models\User;
use Illuminate\Support\Facades\Cache;
use Illuminate\View\View;
class HomeController extends Controller
{
public function __invoke(): View
{
$articles = Cache::remember('home_articles', 300, fn () => WebsiteArticle::with(['user:id,username,look'])
->latest('id')
->take(4)
->get());
$photos = Cache::remember('home_photos', 300, fn () => CameraWeb::query()
->where('visible', true)
->latest('id')
->take(4)
->with('user:id,username,look')
->get());
$onlineUsers = Cache::remember('home_online_users', 30, fn () => User::query()
->where('online', '1')
->inRandomOrder()
->take(12)
->get(['username', 'look']));
return view('index', [
'articles' => $articles,
'photos' => $photos,
'onlineUsers' => $onlineUsers,
]);
}
}