From c37cb3c4a22a5d2cb895558606ace462d242c176 Mon Sep 17 00:00:00 2001 From: Randall Theuns Date: Mon, 17 Feb 2020 22:07:00 +0100 Subject: [PATCH] Also pass the field instance to the generated field callable --- src/Apitizer/Types/GeneratedField.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Apitizer/Types/GeneratedField.php b/src/Apitizer/Types/GeneratedField.php index cfabfef..ef591da 100644 --- a/src/Apitizer/Types/GeneratedField.php +++ b/src/Apitizer/Types/GeneratedField.php @@ -28,6 +28,6 @@ public function __construct(QueryBuilder $queryBuilder, string $type, callable $ protected function getValue($row) { - return call_user_func($this->generator, $row); + return call_user_func($this->generator, $row, $this); } }