dimanche 7 février 2021

laravel 8 x-component replace attribute value

I am using laravel 8 x-component

I have input where i need to replace particular attribute instead merging. For example

<x-input class="col-md-6" id="inputField" type="text" name="username"></x-input>

Suppose if I want to any one of the attribute for example id then how i can change it

if I use below code

<input    class="col-md-6" id="inputField" type="text">

then it will replace all attributes

also $attribute->merge([]) will merge to existing

Also i have one more question ,is it possible to extend $attributes so that i can write custom methods



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire