Skip to content

Commit 34a9d61

Browse files
authored
Add support for usage in action modals (#60)
* implement resolveForAction * Fix indentation
1 parent 3ed4344 commit 34a9d61

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/ConditionalContainer.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,17 @@ public function resolve($resource, $attribute = null)
108108
}
109109

110110
}
111+
112+
public function resolveForAction ($request)
113+
{
114+
$expressionsMap = $this->expressions->map(function ($expression) {
115+
return is_callable($expression) ? $expression() : $expression;
116+
});
117+
118+
$this->withMeta(['expressionsMap' => $expressionsMap]);
119+
120+
return $this->resolveUsing(function () { });
121+
}
111122

112123
public function fill(NovaRequest $request, $model)
113124
{

0 commit comments

Comments
 (0)