Send users_count on event task
This commit is contained in:
@@ -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