diff --git a/src/View/Blade/helpers.php b/src/View/Blade/helpers.php index adeac58667..3b91c2d875 100644 --- a/src/View/Blade/helpers.php +++ b/src/View/Blade/helpers.php @@ -4,6 +4,9 @@ use Statamic\Fields\Value; use Statamic\Fields\Values; +use Statamic\Modifiers\Modify; +use Statamic\Statamic; +use Statamic\Tags\FluentTag; function value(mixed $value): mixed { @@ -11,7 +14,21 @@ function value(mixed $value): mixed $value = $value->value(); } elseif ($value instanceof Values) { $value = $value->all(); + } elseif ($value instanceof FluentTag) { + return value($value->fetch()); + } elseif ($value instanceof Modify) { + return value($value->fetch()); } return $value; } + +function modify(mixed $value): Modify +{ + return Statamic::modify($value); +} + +function tag(string $name): FluentTag +{ + return Statamic::tag($name); +}