json(compact('message'), $status_code); } public static function withData(mixed $data, $status_code = Response::HTTP_OK): JsonResponse { return response()->json(compact('data'), $status_code); } public static function withError(mixed $error, int $status_code): JsonResponse { return response()->json(compact('error'), $status_code); } }