Search code examples
laravellaravel-7laravel-livewire

Livewire: Data Binding not working from UI to controller to UI


When ever I tries to use live wire data binding It give 404 error

contact-form.blade.php

<div wire.transition.fade key="unique-key">
    <input wire:model="named" class="w-full px-5 py-3 border border-gray-400 rounded-lg outline-none focus:shadow-outline" type="text" placeholder="Email Address" />
    {{$named}}
</div>

Contactform.php

<?php

namespace App\Http\Livewire;

use Livewire\Component;

class ContactForm extends Component
{
    public $named = "jelly";

    public function render()
    {
        return view('livewire.contact-form', ['named' => $this->named])->layout('layouts.app');;
    }

    public function mount($named)
    {
        $this->named =$named;
    }
}

Error

enter image description here

its simple data binding from UI to controller in Html inspect wire id is same as wire id present in html request,

Livewire data binding issues this solution also not worked for me enter image description here


Solution

  • Reinstall from Larvel >7 version to specified laravel 7 solve my issue