where('father_id', (int)session()->get('fathers')['id'])->get())) { foreach ($list as $i => $l) { $count += MeetingApprovals::where('meeting_id', (int)$l->id)->whereNull('approval_at')->count(); } } $content = json_decode($response->content(), true); if (json_last_error() == JSON_ERROR_NONE) { $response->setContent(json_encode(array_merge($content, ['notice' => $count]))); } return $response; } }