You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add getFirstWhereStartsWith() to ComponentAttributeBag
Following up on the changes from earlier today, in order to effectively use this with Livewire we need to be able to get the attribute value that starts with 'wire:model' so we can use that value for the error bag, among other reasons.
This function gives you the ability to do that. Your component would look like this:
Usage
```html
<x-text-input wire:model.lazy="name" />
```
Blade Component
```php
<div>
<input type="text" {{$attributes->whereStartsWith('wire:model')}} />
@error($attributes->getFirstWhereStartsWith('wire:model'))
{{$message}}
@enderror
</div>
```
0 commit comments