laravel-idea / plugin

Laravel Idea plugin for PhpStorm
https://laravel-idea.com/
166 stars 7 forks source link

[Feature Request]: Model Binding fields for Livewire Component #402

Open abishekrsrikaanth opened 2 years ago

abishekrsrikaanth commented 2 years ago

Feature Description

First of all, love this plugin. Helps save so much time.

When using this plugin for a Livewire component the suggestions on the blade.php doesn't work when mentioning wire:model="field_name". Is this possible to read the fields from the $rules variable on the component and suggest when setting wire:model on the blade? Model binding of the Livewire component will not work if a field is not mentioned on the $rules variable, so ideally the suggestions can be made from that variable.

adelf commented 2 years ago

Thank you. I'll try to add.

smares commented 2 years ago

Are you sure about the $rules claims? Can't find what you stated in the documentation at first glance and I am also pretty sure I have forms without rules and model binding still works.

abishekrsrikaanth commented 2 years ago

@smares Please refer to the alert here https://laravel-livewire.com/docs/2.x/properties#binding-models after the first example.

CleanShot 2021-10-09 at 01 47 45@2x