Send users_count on event task

This commit is contained in:
T'JAMPENS QUENTIN p2406187
2026-03-27 14:49:44 +01:00
parent 7366c2a199
commit ab36d90796
+3 -1
View File
@@ -116,7 +116,9 @@ class EventsController extends Controller
try { try {
$event = Events::find($id); $event = Events::with(['tasks' => function ($query) {
$query->withCount('users');
}])->find($id);
return response()->json([ return response()->json([
"id" => $event->id, "id" => $event->id,
"name" => $event->name, "name" => $event->name,