2

I am using Laravel 8 with Livewire version 2. but when I create wire:model="name" i cannot received $name variable value in my component

blade.php

<div>
    <input type="text" wire:model="name">

    Hi! My name is {{ $name }}
</div>

comment.php

class Comment extends Component
{
    public $name;

    public function render()
    {
        return view('livewire.comment');
    }
}
Qirel
  • 25,449
  • 7
  • 45
  • 62
  • Does this answer your question? [Laravel Livewire component not refreshing/reloading automatically after refreshing it](https://stackoverflow.com/questions/60395647/laravel-livewire-component-not-refreshing-reloading-automatically-after-refreshi) – Qirel Nov 18 '20 at 16:03

1 Answers1

4

resolved, I was using 2 divs. forgot that it should use only 1 root Element