first, I have followed all documentation about components. (tell me if I missed something)
Now, i have problems when adding laravel input component attribute value like this:
tried number 1:
<x-forms.input.text
value="{{ $datas->product ? $datas->product->code . " - " . $datas->product->name : null }}"
/>
it's not working,
but when I change value like this:
tried number 2:
<x-forms.input.text
value="{{ $datas->product ? $datas->product->code : null }}"
/>
it's working,
my question is:
thanks
laravel version: 9.38.0
EDIT
in view cache, I looking at this: (tried number 1
)
when I remove the "dot" notation, they become like this: (
tried number 2
)
I think the problem is in at "red circle"
the problem is in my double quote:
value="{{ $datas->product ? $datas->product->code . " - " . $datas->product->name : null }}"
that must be a single quote:
value="{{ $datas->product ? $datas->product->code . ' - ' . $datas->product->name : null }}"
here 👆