Initial commit

This commit is contained in:
root
2026-05-09 17:28:23 +02:00
commit 9d73f82529
5575 changed files with 281989 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
<?php
namespace App\Http\Controllers\Miscellaneous;
use App\Http\Controllers\Controller;
use App\Models\Articles\WebsiteArticle;
use App\Models\Miscellaneous\CameraWeb;
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());
return view('index', [
'articles' => $articles,
'photos' => $photos,
]);
}
}