Skip to content

Commit

Permalink
allow Arrayable props
Browse files Browse the repository at this point in the history
  • Loading branch information
emargareten committed Mar 20, 2024
1 parent 4575de6 commit 258d9c3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Modal.php
Expand Up @@ -169,10 +169,12 @@ protected function handleRoute(Request $request, Route $route): mixed

protected function component(): array
{
$props = $this->props instanceof Arrayable ? $this->props->toArray() : $this->props;

return [
'component' => $this->component,
'redirectURL' => $this->redirectURL(),
'props' => $this->resolvePropertyInstances($this->props),
'props' => $this->resolvePropertyInstances($props),
'key' => request()->header('X-Inertia-Modal-Key', (string) Str::uuid()),
];
}
Expand Down

0 comments on commit 258d9c3

Please sign in to comment.