i want to sum 2 values.
my livewire blade codes:
<label>Sayı 1:</label>
<input type="text" id="a" name="a" wire:model.lazy="a">
<br>
<label>Sayı 2:</label>
<input type="text" id="b" name="b" wire:model.lazy="b">
<br>
Sonuç : {{ $result}}
in livewire file
public $result;
public $a;
public $b;
public function render()
{
$this->result=$this->a+$this->b;
return view('livewire.try1');
}
i can not see the result on my page.
i have changed $this->result=$this->a+$this->b; line to $this->result=a+b; and it shows that undefined variable $a.
i have opened debugbar a and b is null.
so i could not make it work.