public function notifications(ChartData $request): JsonResponse 	{ 		$user = $request->user(); 		$min_date = formatTimestamp($request->min_date, 'Y-m-d H:i', $user->timezone); 		$max_date = formatTimestamp($request->max_date, 'Y-m-d H:i', $user->timezone);  		$records = Notification::where('canceled', false) 			->whereNotNull('external_id') 			->whereBetween('scheduled_at', [$min_date, $max_date]) 			->oldest('scheduled_at') 			->get() 			->groupBy(function ($date) use ($request): string { 				return formatLocalTimestamp($date->scheduled_at, $request->date_format); 			});  		$notifications = [];  		foreach ($records as $key => $value) { 			$notifications[] = ['date' => $key, 'value' => count($value)]; 		}  		return response()->json(['data' => $notifications]); 	}