From eda87c18d6da8ca2f07233f059b3b29e4a7fe56c Mon Sep 17 00:00:00 2001 From: Enzo Innocenzi Date: Fri, 7 Apr 2023 12:51:24 +0200 Subject: [PATCH] feat: make `Lazy` macroable --- src/Lazy.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Lazy.php b/src/Lazy.php index 7f1e475bd..e5a3b97bb 100644 --- a/src/Lazy.php +++ b/src/Lazy.php @@ -4,6 +4,7 @@ use Closure; use Illuminate\Database\Eloquent\Model; +use Illuminate\Support\Traits\Macroable; use Spatie\LaravelData\Support\Lazy\ConditionalLazy; use Spatie\LaravelData\Support\Lazy\DefaultLazy; use Spatie\LaravelData\Support\Lazy\InertiaLazy; @@ -11,6 +12,8 @@ abstract class Lazy { + use Macroable; + protected ?bool $defaultIncluded = null; public static function create(Closure $value): DefaultLazy