I have this data
$date = '21-10-1996';
$id = '1';
$count = 0;
And now I want to update the $count data when every $date data and $id data are updated in the livewire form.
how to properly do that?
I have done
public function updateddate($selected_date){
return($selected_date);
}
public function updatedid($selected_id){
$count = select:where('id', $selected_id)->where('date', $this->updateddate($this->date)->count);
}
but the data will only be updated if I change the $id only. if I change the $date, I have to update the $id after that so that the $count data is updated.
source https://stackoverflow.com/questions/69788831/livewire-updated-hook-with-multiple-input
Comments
Post a Comment