Send users_count on event task
This commit is contained in:
1 parent
7366c2a199
commit
ab36d90796
1 file changed
+3
-1
@@ -116,7 +116,9 @@ class EventsController extends Controller
|
||||
|
||||
try {
|
||||
|
||||
$event = Events::find($id);
|
||||
$event = Events::with(['tasks' => function ($query) {
|
||||
$query->withCount('users');
|
||||
}])->find($id);
|
||||
return response()->json([
|
||||
"id" => $event->id,
|
||||
"name" => $event->name,
|
||||
|
||||
Reference in new issue
Block a user