From 34d91b27b428bf5e624e874bb473ff98285ceaee Mon Sep 17 00:00:00 2001 From: Alexander Jensen Date: Fri, 1 Nov 2024 18:03:16 +0100 Subject: [PATCH 1/2] Add LabeledValue --- src/View/Blade/helpers.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/View/Blade/helpers.php b/src/View/Blade/helpers.php index 3463795198..021f7cd22c 100644 --- a/src/View/Blade/helpers.php +++ b/src/View/Blade/helpers.php @@ -2,6 +2,7 @@ namespace Statamic\View\Blade; +use Statamic\Fields\LabeledValue; use Statamic\Fields\Value; use Statamic\Fields\Values; use Statamic\Modifiers\Modify; @@ -11,7 +12,7 @@ function value(mixed $value): mixed { - if ($value instanceof Value) { + if ($value instanceof Value || $value instanceof LabeledValue) { $value = $value->value(); } elseif ($value instanceof Values) { $value = $value->all(); From 7fcd243e8157f2656ac32da3c61caac35cf13c40 Mon Sep 17 00:00:00 2001 From: Jason Varga Date: Thu, 21 Nov 2024 15:16:14 -0500 Subject: [PATCH 2/2] cover more things --- src/View/Blade/helpers.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/View/Blade/helpers.php b/src/View/Blade/helpers.php index 021f7cd22c..2ea2898e3a 100644 --- a/src/View/Blade/helpers.php +++ b/src/View/Blade/helpers.php @@ -2,7 +2,7 @@ namespace Statamic\View\Blade; -use Statamic\Fields\LabeledValue; +use Statamic\Fields\ArrayableString; use Statamic\Fields\Value; use Statamic\Fields\Values; use Statamic\Modifiers\Modify; @@ -12,7 +12,7 @@ function value(mixed $value): mixed { - if ($value instanceof Value || $value instanceof LabeledValue) { + if ($value instanceof Value || $value instanceof ArrayableString) { $value = $value->value(); } elseif ($value instanceof Values) { $value = $value->all();