From afeea00926aa6ca7b4bdf6b866571f1e0d1f259a Mon Sep 17 00:00:00 2001 From: Mohamed Tammam <51543900+MrMohamedAbdallah@users.noreply.github.com> Date: Sun, 20 Aug 2023 14:38:13 +0300 Subject: [PATCH] Fix: Uncompilable declaration of jsonSerialize function. Fix the Uncompilable declaration of jsonSerialize function while using strict types. The error says: Declaration of R64\\NovaFields\\JSON::jsonSerialize() must be compatible with Laravel\\Nova\\Fields\\Field::jsonSerialize(): array --- src/JSON.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/JSON.php b/src/JSON.php index fc3b98b1..ac9f8c62 100644 --- a/src/JSON.php +++ b/src/JSON.php @@ -196,7 +196,7 @@ public function resolveForDisplay($resource, $attribute = null) * * @return array */ - public function jsonSerialize() + public function jsonSerialize(): array { return array_merge(parent::jsonSerialize(), [ 'panelTitleClasses' => $this->panelTitleClasses,