Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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> ```
- Loading branch information