fixing thsu frontend views

This commit is contained in:
Micha
2026-01-16 01:43:07 +01:00
parent fd29b928d8
commit f9de433545
27 changed files with 538 additions and 51 deletions

View File

@@ -0,0 +1,20 @@
<?php
namespace App\Http\Controllers;
use App\Models\Post;
use App\Models\Thread;
use App\Models\User;
use Illuminate\Http\JsonResponse;
class StatsController extends Controller
{
public function __invoke(): JsonResponse
{
return response()->json([
'threads' => Thread::query()->withoutTrashed()->count(),
'posts' => Post::query()->withoutTrashed()->count(),
'users' => User::query()->count(),
]);
}
}