File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -209,15 +209,16 @@ public function resolveAlways(array $props): array
209
209
public function resolvePropertyInstances (array $ props , Request $ request ): array
210
210
{
211
211
foreach ($ props as $ key => $ value ) {
212
- if ($ value instanceof Closure) {
213
- $ value = App::call ($ value );
214
- }
215
-
216
- if ($ value instanceof LazyProp || $ value instanceof OptionalProp || $ value instanceof DeferProp) {
217
- $ value = App::call ($ value );
218
- }
219
-
220
- if ($ value instanceof AlwaysProp) {
212
+ $ resolveViaApp = collect ([
213
+ Closure::class,
214
+ LazyProp::class,
215
+ OptionalProp::class,
216
+ DeferProp::class,
217
+ AlwaysProp::class,
218
+ WhenVisible::class,
219
+ ])->first (fn ($ class ) => $ value instanceof $ class );
220
+
221
+ if ($ resolveViaApp ) {
221
222
$ value = App::call ($ value );
222
223
}
223
224
You can’t perform that action at this time.
0 commit comments