Closed
Description
Laravel Version
10.31.0
PHP Version
8.2.11
Database Driver & Version
No response
Description
When passing multi-word blade component attributes to a child component they don't make it to the child component. Probably best explained with an example:
Steps To Reproduce
I have a blade component called foo
:
@props([
'one' => 'none',
'twoWord' => 'none',
])
{{ $one }} {{ $twoWord }}
And I have another blade component called bar
which simply wraps foo
and passes everything down:
<x-foo :attributes="$attributes"></x-foo>
If I render these two components like this:
<x-foo one="ok" two-word="ok"></x-foo>
<x-bar one="ok" two-word="ok"></x-bar>
I would expect this output:
ok ok
ok ok
However instead I get:
ok ok
ok none
In both instances if I dump the attribute bag inside foo
it's empty, which I would expect.
The two-word
/$twoWord
value just seems to disappear when passed via bar
, but the one
/$one
value works fine.
foo
and bar
are both anonymous components.