From 80fd004299a052ca4ff088f45101b8115f1a3fe5 Mon Sep 17 00:00:00 2001 From: Andrew Minion Date: Fri, 6 Sep 2024 14:50:49 -0500 Subject: [PATCH] preserve fields --- src/Services/FileMakerConnection.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Services/FileMakerConnection.php b/src/Services/FileMakerConnection.php index 568cc32..abc5b7d 100644 --- a/src/Services/FileMakerConnection.php +++ b/src/Services/FileMakerConnection.php @@ -766,9 +766,9 @@ protected function logFMQuery($method, $url, $params, $start) $this->event(new QueryExecuted( $sql, - collect(data_get($params, 'query', []))->map( - fn (array $binding, $index) => collect($binding)->map(fn ($value, $key) => $index . ': ' . $key . ': ' . $value) - )->flatten()->all(), + collect(data_get($params, 'query', []))->flatMap( + fn (array $binding, $index) => collect($binding)->mapWithKeys(fn ($value, $key) => [$index.': '.$key => $value]) + )->all(), $this->getElapsedTime($start), $this, ));